Dependencies:   mbed

Committer:
slowness
Date:
Tue Sep 06 18:10:36 2011 +0000
Revision:
0:cd4c47744fa1

        

Who changed what in which revision?

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