summaryrefslogtreecommitdiffstats
path: root/lib/md5.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/md5.c')
-rw-r--r--lib/md5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/md5.c b/lib/md5.c
index 071630f19..26ec4bbd8 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -107,7 +107,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
-void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
+void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *ctx)
{
unsigned count;
unsigned char *p;
@@ -144,7 +144,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);
- memcpy(digest, ctx->buf, 16);
+ memcpy(digest, ctx->buf, MD5LENGTH);
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}