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