Committer:
donatien
Date:
Fri Jul 09 15:24:33 2010 +0000
Revision:
0:0f5a52711275

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
donatien 0:0f5a52711275 1 /*
donatien 0:0f5a52711275 2 ***********************************************************************
donatien 0:0f5a52711275 3 ** md5.h -- header file for implementation of MD5 **
donatien 0:0f5a52711275 4 ** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
donatien 0:0f5a52711275 5 ** Created: 2/17/90 RLR **
donatien 0:0f5a52711275 6 ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
donatien 0:0f5a52711275 7 ** Revised (for MD5): RLR 4/27/91 **
donatien 0:0f5a52711275 8 ** -- G modified to have y&~z instead of y&z **
donatien 0:0f5a52711275 9 ** -- FF, GG, HH modified to add in last register done **
donatien 0:0f5a52711275 10 ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
donatien 0:0f5a52711275 11 ** -- distinct additive constant for each step **
donatien 0:0f5a52711275 12 ** -- round 4 added, working mod 7 **
donatien 0:0f5a52711275 13 ***********************************************************************
donatien 0:0f5a52711275 14 */
donatien 0:0f5a52711275 15
donatien 0:0f5a52711275 16 /*
donatien 0:0f5a52711275 17 ***********************************************************************
donatien 0:0f5a52711275 18 ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
donatien 0:0f5a52711275 19 ** **
donatien 0:0f5a52711275 20 ** License to copy and use this software is granted provided that **
donatien 0:0f5a52711275 21 ** it is identified as the "RSA Data Security, Inc. MD5 Message- **
donatien 0:0f5a52711275 22 ** Digest Algorithm" in all material mentioning or referencing this **
donatien 0:0f5a52711275 23 ** software or this function. **
donatien 0:0f5a52711275 24 ** **
donatien 0:0f5a52711275 25 ** License is also granted to make and use derivative works **
donatien 0:0f5a52711275 26 ** provided that such works are identified as "derived from the RSA **
donatien 0:0f5a52711275 27 ** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
donatien 0:0f5a52711275 28 ** material mentioning or referencing the derived work. **
donatien 0:0f5a52711275 29 ** **
donatien 0:0f5a52711275 30 ** RSA Data Security, Inc. makes no representations concerning **
donatien 0:0f5a52711275 31 ** either the merchantability of this software or the suitability **
donatien 0:0f5a52711275 32 ** of this software for any particular purpose. It is provided "as **
donatien 0:0f5a52711275 33 ** is" without express or implied warranty of any kind. **
donatien 0:0f5a52711275 34 ** **
donatien 0:0f5a52711275 35 ** These notices must be retained in any copies of any part of this **
donatien 0:0f5a52711275 36 ** documentation and/or software. **
donatien 0:0f5a52711275 37 ***********************************************************************
donatien 0:0f5a52711275 38 */
donatien 0:0f5a52711275 39
donatien 0:0f5a52711275 40 #ifndef MD5_H
donatien 0:0f5a52711275 41 #define MD5_H
donatien 0:0f5a52711275 42
donatien 0:0f5a52711275 43 /* Data structure for MD5 (Message-Digest) computation */
donatien 0:0f5a52711275 44 typedef struct {
donatien 0:0f5a52711275 45 u32_t i[2]; /* number of _bits_ handled mod 2^64 */
donatien 0:0f5a52711275 46 u32_t buf[4]; /* scratch buffer */
donatien 0:0f5a52711275 47 unsigned char in[64]; /* input buffer */
donatien 0:0f5a52711275 48 unsigned char digest[16]; /* actual digest after MD5Final call */
donatien 0:0f5a52711275 49 } MD5_CTX;
donatien 0:0f5a52711275 50
donatien 0:0f5a52711275 51 void MD5Init ( MD5_CTX *mdContext);
donatien 0:0f5a52711275 52 void MD5Update( MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen);
donatien 0:0f5a52711275 53 void MD5Final ( unsigned char hash[], MD5_CTX *mdContext);
donatien 0:0f5a52711275 54
donatien 0:0f5a52711275 55 #endif /* MD5_H */