rob@76
|
1 #ifndef INCLUDED_MD5_H
|
rob@76
|
2 #define INCLUDED_MD5_H
|
rob@76
|
3 /* from rfc1321 appendix A */
|
rob@76
|
4
|
rob@76
|
5 /* POINTER defines a generic pointer type */
|
rob@76
|
6 typedef unsigned char *POINTER;
|
rob@76
|
7
|
rob@76
|
8 /* UINT2 defines a two byte word */
|
rob@76
|
9 typedef unsigned short int UINT2;
|
rob@76
|
10
|
rob@76
|
11 /* UINT4 defines a four byte word */
|
rob@76
|
12 #if defined(__x86_64__) || defined(_M_X64)
|
rob@76
|
13 typedef unsigned int UINT4;
|
rob@76
|
14 #else
|
rob@76
|
15 typedef unsigned long int UINT4;
|
rob@76
|
16 #endif
|
rob@76
|
17
|
rob@76
|
18
|
rob@76
|
19 /* MD5.H - header file for MD5C.C
|
rob@76
|
20 */
|
rob@76
|
21
|
rob@76
|
22 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
rob@76
|
23 rights reserved.
|
rob@76
|
24
|
rob@76
|
25 License to copy and use this software is granted provided that it
|
rob@76
|
26 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
rob@76
|
27 Algorithm" in all material mentioning or referencing this software
|
rob@76
|
28 or this function.
|
rob@76
|
29
|
rob@76
|
30 License is also granted to make and use derivative works provided
|
rob@76
|
31 that such works are identified as "derived from the RSA Data
|
rob@76
|
32 Security, Inc. MD5 Message-Digest Algorithm" in all material
|
rob@76
|
33 mentioning or referencing the derived work.
|
rob@76
|
34
|
rob@76
|
35 RSA Data Security, Inc. makes no representations concerning either
|
rob@76
|
36 the merchantability of this software or the suitability of this
|
rob@76
|
37 software for any particular purpose. It is provided "as is"
|
rob@76
|
38 without express or implied warranty of any kind.
|
rob@76
|
39
|
rob@76
|
40 These notices must be retained in any copies of any part of this
|
rob@76
|
41 documentation and/or software.
|
rob@76
|
42 */
|
rob@76
|
43
|
rob@76
|
44 /* MD5 context. */
|
rob@76
|
45 typedef struct {
|
rob@76
|
46 UINT4 state[4]; /* state (ABCD) */
|
rob@76
|
47 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
|
rob@76
|
48 unsigned char buffer[64]; /* input buffer */
|
rob@76
|
49 } MD5_CTX;
|
rob@76
|
50
|
rob@76
|
51 void MD5Init(MD5_CTX *);
|
rob@76
|
52 void MD5Update(MD5_CTX *, unsigned char *, unsigned int);
|
rob@76
|
53 void MD5Final(unsigned char [16], MD5_CTX *);
|
rob@76
|
54
|
rob@76
|
55 #endif /* INCLUDED_MD5_H */
|