[PATCH 2/2] Do not hardcode the size of md

From: sin <sin_AT_2f30.org>
Date: Fri, 19 Jul 2013 14:31:42 +0100

---
 util/md5.c  | 2 +-
 util/sha1.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/md5.c b/util/md5.c
index b68f729..dc2ca8e 100644
--- a/util/md5.c
+++ b/util/md5.c
_AT_@ -105,7 +105,7 @@ void md5_init(void *ctx)
 	s->h[3] = 0x10325476;
 }
 
-void md5_sum(void *ctx, uint8_t md[16])
+void md5_sum(void *ctx, uint8_t md[MD5_DIGEST_LENGTH])
 {
 	struct md5 *s = ctx;
 	int i;
diff --git a/util/sha1.c b/util/sha1.c
index a298f9f..4003bae 100644
--- a/util/sha1.c
+++ b/util/sha1.c
_AT_@ -101,7 +101,7 @@ void sha1_init(void *ctx)
 	s->h[4] = 0xC3D2E1F0;
 }
 
-void sha1_sum(void *ctx, uint8_t md[20])
+void sha1_sum(void *ctx, uint8_t md[SHA1_DIGEST_LENGTH])
 {
 	struct sha1 *s = ctx;
 	int i;
-- 
1.8.3.3
--8GpibOaaTibBMecb--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Fri Jul 19 2013 - 15:36:12 CEST