Dependents:   RTnoV3 RTnoV3_LED RTnoV3_Template RTnoV3_ADC ... more

Committer:
sherckuith
Date:
Sat Dec 31 11:25:27 2011 +0000
Revision:
0:479ce5546098
Ethernet

Who changed what in which revision?

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