Dependents:   TimeZoneDemo EthernetJackTestCode MMEx_Challenge ntp_mem ... more

Committer:
segundo
Date:
Tue Nov 09 20:54:15 2010 +0000
Revision:
0:ac1725ba162c

        

Who changed what in which revision?

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