Changeset 740 for vendor/current/lib/crypto/md5.c
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/crypto/md5.c
r414 r740 19 19 abartlet@samba.org Jun 2001 */ 20 20 21 #include " includes.h"21 #include "replace.h" 22 22 23 23 #include "md5.h" … … 29 29 * Note: this code is harmless on little-endian machines. 30 30 */ 31 static void byteReverse(uint8_t *buf, u int_t longs)31 static void byteReverse(uint8_t *buf, unsigned int longs) 32 32 { 33 33 uint32_t t; 34 34 do { 35 t = (uint32_t) ((u int_t) buf[3] << 8 | buf[2]) << 16 |36 ((u int_t) buf[1] << 8 | buf[0]);35 t = (uint32_t) ((unsigned int) buf[3] << 8 | buf[2]) << 16 | 36 ((unsigned int) buf[1] << 8 | buf[0]); 37 37 *(uint32_t *) buf = t; 38 38 buf += 4; … … 109 109 _PUBLIC_ void MD5Final(uint8_t digest[16], struct MD5Context *ctx) 110 110 { 111 u int_t count;111 unsigned int count; 112 112 uint8_t *p; 113 113 … … 145 145 byteReverse((uint8_t *) ctx->buf, 4); 146 146 memmove(digest, ctx->buf, 16); 147 memset(ctx, 0, sizeof( ctx)); /* In case it's sensitive */147 memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ 148 148 } 149 149
Note:
See TracChangeset
for help on using the changeset viewer.