|
|
1.1.1.2 root 1: /*
2: ***********************************************************************
3: ** md5.h -- header file for implementation of MD5 **
4: ** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
5: ** Created: 2/17/90 RLR **
6: ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
7: ** Revised (for MD5): RLR 4/27/91 **
8: ** -- G modified to have y&~z instead of y&z **
9: ** -- FF, GG, HH modified to add in last register done **
10: ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
11: ** -- distinct additive constant for each step **
12: ** -- round 4 added, working mod 7 **
13: ***********************************************************************
14: */
15:
16: /*
1.1.1.4 ! root 17: * Edited 7 May 93 by CP to change the interface to match that
! 18: * of the MD5 routines in RSAREF. Due to this alteration, this
! 19: * code is "derived from the RSA Data Security, Inc. MD5 Message-
! 20: * Digest Algorithm". (See below.) Also added argument names
! 21: * to the prototypes.
! 22: */
! 23:
! 24: /*
1.1.1.2 root 25: ***********************************************************************
26: ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
27: ** **
28: ** License to copy and use this software is granted provided that **
29: ** it is identified as the "RSA Data Security, Inc. MD5 Message- **
30: ** Digest Algorithm" in all material mentioning or referencing this **
31: ** software or this function. **
32: ** **
33: ** License is also granted to make and use derivative works **
34: ** provided that such works are identified as "derived from the RSA **
35: ** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
36: ** material mentioning or referencing the derived work. **
37: ** **
38: ** RSA Data Security, Inc. makes no representations concerning **
39: ** either the merchantability of this software or the suitability **
40: ** of this software for any particular purpose. It is provided "as **
41: ** is" without express or implied warranty of any kind. **
42: ** **
43: ** These notices must be retained in any copies of any part of this **
44: ** documentation and/or software. **
45: ***********************************************************************
46: */
47:
48: /* typedef a 32-bit type */
1.1.1.3 root 49: #ifdef __alpha
50: typedef unsigned int UINT4;
51: #else
1.1.1.2 root 52: typedef unsigned long int UINT4;
1.1.1.3 root 53: #endif
1.1.1.2 root 54:
55: /* Data structure for MD5 (Message-Digest) computation */
56: typedef struct {
57: UINT4 buf[4]; /* scratch buffer */
1.1.1.4 ! root 58: UINT4 i[2]; /* number of _bits_ handled mod 2^64 */
1.1.1.2 root 59: unsigned char in[64]; /* input buffer */
60: } MD5_CTX;
61:
1.1.1.4 ! root 62: void MD5Init(MD5_CTX *mdContext);
! 63: void MD5Update(MD5_CTX *mdContext, unsigned char *bug, unsigned int len);
! 64: void MD5Final(unsigned char digest[16], MD5_CTX *mdContext);
! 65: void Transform(UINT4 *buf, UINT4 *in);
1.1.1.2 root 66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.