Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / h / RCS / md5.h,v
1 head    1.2;
2 access;
3 symbols;
4 locks; strict;
5 comment @ * @;
6
7
8 1.2
9 date    92.10.26.16.38.50;      author jromine; state Exp;
10 branches;
11 next    1.1;
12
13 1.1
14 date    92.02.11.05.16.53;      author jromine; state Exp;
15 branches;
16 next    ;
17
18
19 desc
20 @@
21
22
23 1.2
24 log
25 @source changed (output is the same) from MTR
26 @
27 text
28 @/* @@(#)$Id: md5.h,v 1.1 1992/02/11 05:16:53 jromine Exp jromine $ */
29 /* taken from RFC-1321/Appendices A.1/A.2 */
30
31 /* GLOBAL.H - RSAREF types and constants
32  */
33
34 /* PROTOTYPES should be set to one if and only if the compiler supports
35   function argument prototyping.
36 The following makes PROTOTYPES default to 0 if it has not already
37   been defined with C compiler flags.
38  */
39 #ifndef PROTOTYPES
40 #define PROTOTYPES 0
41 #endif
42
43 /* POINTER defines a generic pointer type */
44 typedef unsigned char *POINTER;
45
46 /* UINT2 defines a two byte word */
47 typedef unsigned short int UINT2;
48
49 /* UINT4 defines a four byte word */
50 typedef unsigned long int UINT4;
51
52 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
53 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
54   returns an empty list.
55  */
56 #if PROTOTYPES
57 #define PROTO_LIST(list) list
58 #else
59 #define PROTO_LIST(list) ()
60 #endif
61
62 /* MD5.H - header file for MD5C.C
63  */
64
65 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
66 rights reserved.
67
68 License to copy and use this software is granted provided that it
69 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
70 Algorithm" in all material mentioning or referencing this software
71 or this function.
72
73 License is also granted to make and use derivative works provided
74 that such works are identified as "derived from the RSA Data
75 Security, Inc. MD5 Message-Digest Algorithm" in all material
76 mentioning or referencing the derived work.
77
78 RSA Data Security, Inc. makes no representations concerning either
79 the merchantability of this software or the suitability of this
80 software for any particular purpose. It is provided "as is"
81 without express or implied warranty of any kind.
82
83 These notices must be retained in any copies of any part of this
84 documentation and/or software.
85  */
86
87 /* MD5 context. */
88 typedef struct {
89   UINT4 state[4];                                   /* state (ABCD) */
90   UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
91   unsigned char buffer[64];                         /* input buffer */
92 } MD5_CTX;
93
94 void MD5Init PROTO_LIST ((MD5_CTX *));
95 void MD5Update PROTO_LIST
96   ((MD5_CTX *, unsigned char *, unsigned int));
97 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
98
99 @
100
101
102 1.1
103 log
104 @Initial revision
105 @
106 text
107 @d1 4
108 a4 14
109 /* @@(#)$Id$ */
110 /*
111  ***********************************************************************
112  ** md5.h -- header file for implementation of MD5                    **
113  ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **
114  ** Created: 2/17/90 RLR                                              **
115  ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **
116  ** Revised (for MD5): RLR 4/27/91                                    **
117  **   -- G modified to have y&~z instead of y&z                       **
118  **   -- FF, GG, HH modified to add in last register done             **
119  **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **
120  **   -- distinct additive constant for each step                     **
121  **   -- round 4 added, working mod 7                                 **
122  ***********************************************************************
123 d7 4
124 a10 22
125 /*
126  ***********************************************************************
127  ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved.  **
128  **                                                                   **
129  ** License to copy and use this software is granted provided that    **
130  ** it is identified as the "RSA Data Security, Inc. MD5 Message-     **
131  ** Digest Algorithm" in all material mentioning or referencing this  **
132  ** software or this function.                                        **
133  **                                                                   **
134  ** License is also granted to make and use derivative works          **
135  ** provided that such works are identified as "derived from the RSA  **
136  ** Data Security, Inc. MD5 Message-Digest Algorithm" in all          **
137  ** material mentioning or referencing the derived work.              **
138  **                                                                   **
139  ** RSA Data Security, Inc. makes no representations concerning       **
140  ** either the merchantability of this software or the suitability    **
141  ** of this software for any particular purpose.  It is provided "as  **
142  ** is" without express or implied warranty of any kind.              **
143  **                                                                   **
144  ** These notices must be retained in any copies of any part of this  **
145  ** documentation and/or software.                                    **
146  ***********************************************************************
147 d12 3
148 d16 7
149 a22 1
150 /* typedef a 32-bit type */
151 d25 36
152 a60 1
153 /* Data structure for MD5 (Message-Digest) computation */
154 d62 3
155 a64 4
156   UINT4 i[2];                   /* number of _bits_ handled mod 2^64 */
157   UINT4 buf[4];                                    /* scratch buffer */
158   unsigned char in[64];                              /* input buffer */
159   unsigned char digest[16];     /* actual digest after MD5Final call */
160 d67 5
161 a71 8
162 void MD5Init ();
163 void MD5Update ();
164 void MD5Final ();
165 /*
166  ***********************************************************************
167  ** End of md5.h                                                      **
168  ******************************** (cut) ********************************
169  */
170 @