wafsamba: remove unused variable from copy_and_fix_python_path
[Samba.git] / lib / crypto / md5.h
blobedae27f65bd809089b4ddffe1cbd6dd4808f73df
1 #ifndef MD5_H
2 #define MD5_H
4 #ifndef HEADER_MD5_H
5 /* Try to avoid clashes with OpenSSL */
6 #define HEADER_MD5_H
7 #endif
9 #if defined(HAVE_BSD_MD5_H)
10 /* Try to avoid clashes with BSD MD5 implementation (on linux) */
11 #include <bsd/md5.h>
13 #elif defined(HAVE_SYS_MD5_H)
14 /* Try to avoid clashes with BSD MD5 implementation (on BSD) */
15 #include <sys/md5.h>
17 /* Try to use CommonCrypto on Mac as otherwise we can get MD5Final twice */
18 #elif defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
19 #include <CommonCrypto/CommonDigest.h>
21 #define MD5Init(c) CC_MD5_Init(c)
22 #define MD5Update(c,d,l) CC_MD5_Update(c,d,l)
23 #define MD5Final(m, c) CC_MD5_Final((unsigned char *)m,c)
24 #define MD5Context CC_MD5state_st
26 #else
27 typedef struct MD5Context {
28 uint32_t buf[4];
29 uint32_t bits[2];
30 uint8_t in[64];
31 } MD5_CTX;
33 #define MD5_DIGEST_LENGTH 16
35 void MD5Init(MD5_CTX *context);
36 void MD5Update(MD5_CTX *context, const uint8_t *buf,
37 size_t len);
38 void MD5Final(uint8_t digest[MD5_DIGEST_LENGTH], MD5_CTX *context);
39 #endif /* HAVE_*MD5_H */
41 #endif /* !MD5_H */