md5: cleanup
* Indentation * Removed MD5DumpBytes() * Removed ASM_MD5
This commit is contained in:
22
src/md5.c
22
src/md5.c
@@ -154,8 +154,6 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
|
|||||||
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
|
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef ASM_MD5
|
|
||||||
|
|
||||||
/* The four core functions - F1 is optimized somewhat */
|
/* The four core functions - F1 is optimized somewhat */
|
||||||
|
|
||||||
/* #define F1(x, y, z) (x & y | ~x & z) */
|
/* #define F1(x, y, z) (x & y | ~x & z) */
|
||||||
@@ -270,23 +268,3 @@ static void MD5Transform(uint32_t buf[4], const unsigned char inext[64],
|
|||||||
buf[2] += c;
|
buf[2] += c;
|
||||||
buf[3] += d;
|
buf[3] += d;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_MD5
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
void MD5DumpBytes(unsigned char *b, int len)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i=0; i<len; i++) {
|
|
||||||
if (i%32==0 && i!=0) {
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
printf("%02x", b[i]&0xff);
|
|
||||||
}
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* DEBUG_MD5 */
|
|
||||||
|
|
||||||
#endif /* !MD5_ASM */
|
|
||||||
|
|||||||
@@ -25,8 +25,4 @@ void MD5Update(struct MD5Context *context, unsigned char const *buf,
|
|||||||
uint32_t len);
|
uint32_t len);
|
||||||
void MD5Final(unsigned char digest[16], struct MD5Context *context);
|
void MD5Final(unsigned char digest[16], struct MD5Context *context);
|
||||||
|
|
||||||
#ifdef DEBUG_MD5
|
|
||||||
void MD5DumpBytes(unsigned char *b, int len);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !MD5_H */
|
#endif /* !MD5_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user