Committer:
mbed714
Date:
Sat Sep 18 23:05:49 2010 +0000
Revision:
0:d616ece2d859

        

Who changed what in which revision?

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