]> Pileus Git - ~andy/fetchmail/blob - fm_md5.h
6fccc526347747f00a45ef9b3ae5f400e963c8ab
[~andy/fetchmail] / fm_md5.h
1 #ifndef MD5_H
2 #define MD5_H
3
4 #include "config.h"
5
6 #include <sys/types.h>
7
8 #ifdef HAVE_MD5_H
9 #include <md5.h>
10 #else
11
12 #ifndef HEADER_MD5_H
13 /* Try to avoid clashes with OpenSSL */
14 #define HEADER_MD5_H 
15 #endif
16
17
18 #if SIZEOF_INT == 4
19 typedef unsigned int uint32;
20 #else
21 typedef unsigned long int uint32;
22 #endif
23
24 struct MD5Context {
25         uint32 buf[4];
26         uint32 bits[2];
27         unsigned char in[64];
28 };
29
30 void MD5Init(struct MD5Context *context);
31 void MD5Update(struct MD5Context *context, const void *buf, unsigned len);
32 void MD5Final(void *digest, struct MD5Context *context);
33 void MD5Transform(uint32 buf[], uint32 const in[]);
34
35 /*
36  * This is needed to make RSAREF happy on some MS-DOS compilers.
37  */
38 typedef struct MD5Context MD5_CTX;
39
40 #endif
41 #endif /* !MD5_H */