Committer:
zoot661
Date:
Tue May 29 09:49:18 2012 +0000
Revision:
0:f993b6d8b1d8

        

Who changed what in which revision?

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