0
|
1 /* @(#)$Id$ */
|
|
2 /* taken from RFC-1321/Appendices A.1/A.2 */
|
|
3
|
|
4 /* GLOBAL.H - RSAREF types and constants
|
|
5 */
|
|
6
|
|
7 /* PROTOTYPES should be set to one if and only if the compiler supports
|
|
8 function argument prototyping.
|
|
9 The following makes PROTOTYPES default to 0 if it has not already
|
|
10 been defined with C compiler flags.
|
|
11 */
|
|
12 #ifndef PROTOTYPES
|
|
13 #define PROTOTYPES 0
|
|
14 #endif
|
|
15
|
|
16 /* POINTER defines a generic pointer type */
|
|
17 typedef unsigned char *POINTER;
|
|
18
|
|
19 /* UINT2 defines a two byte word */
|
|
20 typedef unsigned short int UINT2;
|
|
21
|
|
22 /* UINT4 defines a four byte word */
|
|
23 #ifndef __alpha
|
|
24 typedef unsigned long int UINT4;
|
|
25 #else
|
|
26 typedef unsigned int UINT4;
|
|
27 #endif
|
|
28
|
|
29 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
|
|
30 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
|
|
31 returns an empty list.
|
|
32 */
|
|
33 #if PROTOTYPES
|
|
34 #define PROTO_LIST(list) list
|
|
35 #else
|
|
36 #define PROTO_LIST(list) ()
|
|
37 #endif
|
|
38
|
|
39 /* MD5.H - header file for MD5C.C
|
|
40 */
|
|
41
|
|
42 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
|
43 rights reserved.
|
|
44
|
|
45 License to copy and use this software is granted provided that it
|
|
46 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
|
47 Algorithm" in all material mentioning or referencing this software
|
|
48 or this function.
|
|
49
|
|
50 License is also granted to make and use derivative works provided
|
|
51 that such works are identified as "derived from the RSA Data
|
|
52 Security, Inc. MD5 Message-Digest Algorithm" in all material
|
|
53 mentioning or referencing the derived work.
|
|
54
|
|
55 RSA Data Security, Inc. makes no representations concerning either
|
|
56 the merchantability of this software or the suitability of this
|
|
57 software for any particular purpose. It is provided "as is"
|
|
58 without express or implied warranty of any kind.
|
|
59
|
|
60 These notices must be retained in any copies of any part of this
|
|
61 documentation and/or software.
|
|
62 */
|
|
63
|
|
64 /* MD5 context. */
|
|
65 typedef struct {
|
|
66 UINT4 state[4]; /* state (ABCD) */
|
|
67 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
|
|
68 unsigned char buffer[64]; /* input buffer */
|
|
69 } MD5_CTX;
|
|
70
|
|
71 void MD5Init PROTO_LIST ((MD5_CTX *));
|
|
72 void MD5Update PROTO_LIST
|
|
73 ((MD5_CTX *, unsigned char *, unsigned int));
|
|
74 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
|
|
75
|