0
|
1 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All |
|
2 * rights reserved. |
|
3 * |
|
4 * License to copy and use this software is granted provided that it |
|
5 * is identified as the "RSA Data Security, Inc. MD5 Message-Digest |
|
6 * Algorithm" in all material mentioning or referencing this software |
|
7 * or this function. |
|
8 * |
|
9 * License is also granted to make and use derivative works provided |
|
10 * that such works are identified as "derived from the RSA Data |
|
11 * Security, Inc. MD5 Message-Digest Algorithm" in all material |
|
12 * mentioning or referencing the derived work. |
|
13 * |
|
14 * RSA Data Security, Inc. makes no representations concerning either |
|
15 * the merchantability of this software or the suitability of this |
|
16 * software for any particular purpose. It is provided "as is" |
|
17 * without express or implied warranty of any kind. |
|
18 * |
|
19 * These notices must be retained in any copies of any part of this |
|
20 * documentation and/or software. |
|
21 */ |
|
22 |
|
23 /* Rhyolite Software DCC 1.3.103-1.4 $Revision$ */ |
|
24 |
|
25 #ifndef DCC_MD5_H |
|
26 #define DCC_MD5_H |
|
27 |
|
28 #define MD5_DIGEST_LEN 16 |
|
29 typedef u_char MD5_DIGEST[MD5_DIGEST_LEN]; |
|
30 |
|
31 typedef struct { |
|
32 u_int32_t state[4]; /* state (ABCD) */ |
|
33 u_int32_t count[2]; /* # of bits, modulo 2^64 (LSB 1st) */ |
|
34 unsigned char buffer[64]; /* input buffer */ |
|
35 } DCC_MD5_CTX; |
|
36 |
|
37 extern void DCC_MD5Init(DCC_MD5_CTX *); |
|
38 extern void DCC_MD5Update(DCC_MD5_CTX *, const void *, u_int); |
|
39 extern void DCC_MD5Final(u_char[16], DCC_MD5_CTX *); |
|
40 |
|
41 |
|
42 #ifdef HAVE_MD5 |
|
43 #include <md5.h> |
|
44 #else |
|
45 #define MD5_CTX DCC_MD5_CTX |
|
46 #define MD5Init DCC_MD5Init |
|
47 #define MD5Update DCC_MD5Update |
|
48 #define MD5Final DCC_MD5Final |
|
49 #endif |
|
50 |
|
51 |
|
52 #endif /* DCC_MD5_H */ |