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