Optimisations
[l2tpns.git] / md5.h
1 /* GLOBAL.H - RSAREF types and constants
2 */
3
4 /* PROTOTYPES should be set to one if and only if the compiler supports
5 function argument prototyping.
6 The following makes PROTOTYPES default to 0 if it has not already
7
8 been defined with C compiler flags.
9 */
10 #ifndef PROTOTYPES
11 #define PROTOTYPES 0
12 #endif
13
14 /* POINTER defines a generic pointer type */
15 typedef unsigned char *POINTER;
16
17 /* UINT2 defines a two byte word */
18 typedef unsigned short int UINT2;
19
20 /* UINT4 defines a four byte word */
21 typedef unsigned long int UINT4;
22
23 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
24 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
25 returns an empty list.
26 */
27 #if PROTOTYPES
28 #define PROTO_LIST(list) list
29 #else
30 #define PROTO_LIST(list) ()
31 #endif
32
33
34 /* MD5.H - header file for MD5C.C
35 */
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
68 ((MD5_CTX *, unsigned char *, unsigned int));
69 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
70