http://mbed.org/users/okini3939/notebook/logger/

Dependencies:   mbed

Committer:
okini3939
Date:
Sat Apr 16 15:15:48 2011 +0000
Revision:
0:a3c892f39cc1

        

Who changed what in which revision?

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