ff8d0c835ed0c05cd2329288ac7aa202d06cb53b
[citadel.git] / citadel / md5.h
1 #ifndef MD5_H
2 #define MD5_H
3
4 #include "typesize.h"
5
6 struct MD5Context {
7         cit_uint32_t buf[4];
8         cit_uint32_t bits[2];
9         cit_uint32_t in[16];
10 };
11
12 void MD5Init(struct MD5Context *context);
13 void MD5Update(struct MD5Context *context, unsigned char const *buf,
14                unsigned len);
15 void MD5Final(unsigned char digest[16], struct MD5Context *context);
16 void MD5Transform(cit_uint32_t buf[4], cit_uint32_t const in[16]);
17 char *make_apop_string(char *realpass, char *nonce, char *buffer);
18
19 /*
20  * This is needed to make RSAREF happy on some MS-DOS compilers.
21  */
22 #ifndef HAVE_OPENSSL
23 typedef struct MD5Context MD5_CTX;
24 #endif
25
26 #define MD5_DIGEST_LEN          16
27 #define MD5_HEXSTRING_SIZE      33
28
29 #endif /* !MD5_H */