blob: 525a45e90d1d8c1c5645887dc963db7240da9ebd
1 | #ifndef MD5_H |
2 | #define MD5_H |
3 | /* |
4 | * LIC: GPL |
5 | */ |
6 | |
7 | #include "config.h" |
8 | |
9 | #if SIZEOF_UNSIGNED_INT == 4 |
10 | typedef unsigned int uint32; |
11 | #elif SIZEOF_UNSIGNED_LONG == 4 |
12 | typedef unsigned long uint32; |
13 | #else |
14 | # error Could not find a 32-bit integer type |
15 | #endif |
16 | |
17 | struct MD5Context { |
18 | uint32 buf[4]; |
19 | uint32 bits[2]; |
20 | unsigned char in[64]; |
21 | }; |
22 | |
23 | void MD5Init(struct MD5Context *context); |
24 | void MD5Update(struct MD5Context *context, unsigned char const *buf, |
25 | unsigned len); |
26 | void MD5Final(unsigned char digest[16], struct MD5Context *context); |
27 | void MD5Transform(uint32 buf[4], uint32 const in[16]); |
28 | |
29 | /* |
30 | * This is needed to make RSAREF happy on some MS-DOS compilers. |
31 | */ |
32 | typedef struct MD5Context MD5_CTX; |
33 | |
34 | #endif /* !MD5_H */ |
35 |