From 634f8276dd85872aa2d4f90b5f7b37c56ca5aff9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 6 Feb 2012 16:53:52 +0100 Subject: crypto/md5: Change prototypes to match BSD. --- lib/crypto/md5.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/md5.h b/lib/crypto/md5.h index 4064d6f003..e61c27a73e 100644 --- a/lib/crypto/md5.h +++ b/lib/crypto/md5.h @@ -5,15 +5,17 @@ #define HEADER_MD5_H #endif -struct MD5Context { +typedef struct MD5Context { uint32_t buf[4]; uint32_t bits[2]; uint8_t in[64]; -}; +} MD5_CTX; -void MD5Init(struct MD5Context *context); -void MD5Update(struct MD5Context *context, const uint8_t *buf, +#define MD5_DIGEST_LENGTH 16 + +void MD5Init(MD5_CTX *context); +void MD5Update(MD5_CTX *context, const uint8_t *buf, size_t len); -void MD5Final(uint8_t digest[16], struct MD5Context *context); +void MD5Final(uint8_t digest[MD5_DIGEST_LENGTH], MD5_CTX *context); #endif /* !MD5_H */ -- cgit