summaryrefslogtreecommitdiff
path: root/src/md5.h (plain)
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
10typedef unsigned int uint32;
11#elif SIZEOF_UNSIGNED_LONG == 4
12typedef unsigned long uint32;
13#else
14# error Could not find a 32-bit integer type
15#endif
16
17struct MD5Context {
18 uint32 buf[4];
19 uint32 bits[2];
20 unsigned char in[64];
21};
22
23void MD5Init(struct MD5Context *context);
24void MD5Update(struct MD5Context *context, unsigned char const *buf,
25 unsigned len);
26void MD5Final(unsigned char digest[16], struct MD5Context *context);
27void MD5Transform(uint32 buf[4], uint32 const in[16]);
28
29/*
30 * This is needed to make RSAREF happy on some MS-DOS compilers.
31 */
32typedef struct MD5Context MD5_CTX;
33
34#endif /* !MD5_H */
35