summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-02-06 16:53:52 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-02-07 01:11:08 +0100
commit634f8276dd85872aa2d4f90b5f7b37c56ca5aff9 (patch)
tree86121c024ada19da714c2f2947bb5187e6e464c3 /lib
parenta0ff4c349c6b75f9e5fa6b4ad0e69a4aa8e471b0 (diff)
downloadsamba-634f8276dd85872aa2d4f90b5f7b37c56ca5aff9.tar.gz
samba-634f8276dd85872aa2d4f90b5f7b37c56ca5aff9.tar.bz2
samba-634f8276dd85872aa2d4f90b5f7b37c56ca5aff9.zip
crypto/md5: Change prototypes to match BSD.
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/md5.h12
1 files changed, 7 insertions, 5 deletions
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 */