Update to upstream util-linux 2.20.1
[framework/base/util-linux-ng.git] / include / md5.h
1 #ifndef MD5_H
2 #define MD5_H
3
4 #if HAVE_STDINT_H
5 #include <stdint.h>
6 #else
7 typedef unsigned int uint32_t;
8 #endif
9
10 #define MD5LENGTH 16
11
12 struct MD5Context {
13         uint32_t buf[4];
14         uint32_t bits[2];
15         unsigned char in[64];
16 };
17
18 void MD5Init(struct MD5Context *context);
19 void MD5Update(struct MD5Context *context, unsigned char const *buf,
20                unsigned len);
21 void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *context);
22 void 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  */
27 typedef struct MD5Context MD5_CTX;
28
29 #endif /* !MD5_H */