9 date 92.10.26.16.38.50; author jromine; state Exp;
14 date 92.02.11.05.16.53; author jromine; state Exp;
25 @source changed (output is the same) from MTR
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 */
31 /* GLOBAL.H - RSAREF types and constants
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.
43 /* POINTER defines a generic pointer type */
44 typedef unsigned char *POINTER;
46 /* UINT2 defines a two byte word */
47 typedef unsigned short int UINT2;
49 /* UINT4 defines a four byte word */
50 typedef unsigned long int UINT4;
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.
57 #define PROTO_LIST(list) list
59 #define PROTO_LIST(list) ()
62 /* MD5.H - header file for MD5C.C
65 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
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
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.
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.
83 These notices must be retained in any copies of any part of this
84 documentation and/or software.
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 */
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 *));
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 ***********************************************************************
126 ***********************************************************************
127 ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
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. **
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. **
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. **
144 ** These notices must be retained in any copies of any part of this **
145 ** documentation and/or software. **
146 ***********************************************************************
150 /* typedef a 32-bit type */
153 /* Data structure for MD5 (Message-Digest) computation */
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 */
166 ***********************************************************************
168 ******************************** (cut) ********************************