Initial revision
[l2tpns.git] / md5.h
1 /* GLOBAL.H - RSAREF types and constants
2 */
3
4 #include "config.h"
5
6 /* PROTOTYPES should be set to one if and only if the compiler supports
7 function argument prototyping.
8 The following makes PROTOTYPES default to 0 if it has not already
9
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 typedef unsigned long int UINT4;
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
36 /* MD5.H - header file for MD5C.C
37 */
38
39 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
40 rights reserved.
41
42 License to copy and use this software is granted provided that it
43 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
44 Algorithm" in all material mentioning or referencing this software
45 or this function.
46
47 License is also granted to make and use derivative works provided
48 that such works are identified as "derived from the RSA Data
49 Security, Inc. MD5 Message-Digest Algorithm" in all material
50 mentioning or referencing the derived work.
51
52 RSA Data Security, Inc. makes no representations concerning either
53 the merchantability of this software or the suitability of this
54 software for any particular purpose. It is provided "as is"
55 without express or implied warranty of any kind.
56
57 These notices must be retained in any copies of any part of this
58 documentation and/or software.
59 */
60
61 /* MD5 context. */
62 typedef struct {
63 UINT4 state[4]; /* state (ABCD) */
64 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
65 unsigned char buffer[64]; /* input buffer */
66 } MD5_CTX;
67
68 void MD5Init PROTO_LIST ((MD5_CTX *));
69 void MD5Update PROTO_LIST
70 ((MD5_CTX *, unsigned char *, unsigned int));
71 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
72