]>
Commit | Line | Data |
---|---|---|
faeb1b64 KZ |
1 | /* |
2 | * No copyright is claimed. This code is in the public domain; do with it what | |
3 | * you wish. | |
4 | */ | |
42dea85c KZ |
5 | #ifndef UTIL_LINUX_MD5_H |
6 | #define UTIL_LINUX_MD5_H | |
6dbe3af9 | 7 | |
d03dd608 | 8 | #include <stdint.h> |
6dbe3af9 | 9 | |
42dea85c | 10 | #define UL_MD5LENGTH 16 |
e429d141 | 11 | |
42dea85c | 12 | struct UL_MD5Context { |
d03dd608 KZ |
13 | uint32_t buf[4]; |
14 | uint32_t bits[2]; | |
6dbe3af9 KZ |
15 | unsigned char in[64]; |
16 | }; | |
17 | ||
13ae0352 RP |
18 | void ul_MD5Init(struct UL_MD5Context *ctx); |
19 | void ul_MD5Update(struct UL_MD5Context *ctx, unsigned char const *buf, unsigned len); | |
20 | void ul_MD5Final(unsigned char digest[UL_MD5LENGTH], struct UL_MD5Context *ctx); | |
42dea85c | 21 | void ul_MD5Transform(uint32_t buf[4], uint32_t const in[16]); |
6dbe3af9 KZ |
22 | |
23 | /* | |
24 | * This is needed to make RSAREF happy on some MS-DOS compilers. | |
25 | */ | |
42dea85c | 26 | typedef struct UL_MD5Context UL_MD5_CTX; |
6dbe3af9 | 27 | |
42dea85c | 28 | #endif /* !UTIL_LINUX_MD5_H */ |