bcdf50c0008669a47650ceef58d725c8b35a0bde
[samba.git] / lib / crypto / md5.h
1 #ifndef MD5_H
2 #define MD5_H
3
4 #ifndef HEADER_MD5_H
5 /* Try to avoid clashes with OpenSSL */
6 #define HEADER_MD5_H 
7 #endif
8
9 #ifdef HAVE_BSD_MD5_H
10 /* Try to avoid clashes with BSD MD5 implementation */
11 #include <bsd/md5.h>
12 #else
13 typedef struct MD5Context {
14         uint32_t buf[4];
15         uint32_t bits[2];
16         uint8_t in[64];
17 } MD5_CTX;
18
19 #define MD5_DIGEST_LENGTH 16
20
21 void MD5Init(MD5_CTX *context);
22 void MD5Update(MD5_CTX *context, const uint8_t *buf,
23                size_t len);
24 void MD5Final(uint8_t digest[MD5_DIGEST_LENGTH], MD5_CTX *context);
25 #endif /* HAVE_BSD_MD5_H */
26
27 #endif /* !MD5_H */