summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */