crypto/md5: Change prototypes to match BSD.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 6 Feb 2012 15:53:52 +0000 (16:53 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 7 Feb 2012 00:11:08 +0000 (01:11 +0100)
lib/crypto/md5.h

index 4064d6f00396e82aae362978fcea68a01fd7f470..e61c27a73eb5b003aae242df40f5af92e7c0181d 100644 (file)
@@ -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 */