blob: d997e379d7cf0f9112fc2c8e38a404bc72555a78 [file] [log] [blame]
bigbiff bigbiffe60683a2013-02-22 20:55:50 -05001#ifndef MD5_H
2#define MD5_H
3
4#ifdef HAVE_STDINT_H
5#include <stdint.h>
6#else
7typedef unsigned int uint32_t;
8#endif
9
10#define MD5LENGTH 16
11
12struct MD5Context {
13 uint32_t buf[4];
14 uint32_t bits[2];
15 unsigned char in[64];
16};
17
18void MD5Init(struct MD5Context *context);
19void MD5Update(struct MD5Context *context, unsigned char const *buf,
20 unsigned len);
21void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *context);
22void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
23
24/*
25 * This is needed to make RSAREF happy on some MS-DOS compilers.
26 */
27typedef struct MD5Context MD5_CTX;
28
29#endif /* !MD5_H */