12Oct2012MbedLab

Dependents:   Lab3_VoiceMeter

Fork of EthernetNetIf by Donatien Garnier

Committer:
psawant9
Date:
Fri Oct 12 16:02:00 2012 +0000
Revision:
6:22ce63eddd2b
Parent:
0:422060928e37
Done

Who changed what in which revision?

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