chiark / gitweb /
Initial checkin as found.
[nntp-merge-chiark.git] / md5.h
1 /*
2  * Header file for Colin Plumb's MD5 implementation.
3  * Modified by Ian Jackson so as not to use Colin Plumb's `usuals.h'.
4  *
5  * This file is in the public domain.
6  */
7
8 #ifndef MD5_H
9 #define MD5_H
10
11 #define UINT8 unsigned char
12 #define UINT32 unsigned long
13
14 struct MD5Context {
15         UINT32 buf[4];
16         UINT32 bytes[2];
17         UINT32 in[16];
18 };
19
20 void MD5Init(struct MD5Context *context);
21 void MD5Update(struct MD5Context *context, UINT8 const *buf, unsigned len);
22 void MD5Final(unsigned char digest[16], struct MD5Context *context);
23 void MD5Transform(UINT32 buf[4], UINT32 const in[16]);
24
25 void byteSwap(UINT32 *buf, unsigned words);
26
27 #endif /* !MD5_H */