From: Jelmer Vernooij Date: Mon, 6 Feb 2012 15:53:52 +0000 (+0100) Subject: crypto/md5: Change prototypes to match BSD. X-Git-Tag: tevent-0.9.15~26 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=634f8276dd85872aa2d4f90b5f7b37c56ca5aff9 crypto/md5: Change prototypes to match BSD. --- diff --git a/lib/crypto/md5.h b/lib/crypto/md5.h index 4064d6f0039..e61c27a73eb 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 */