创建mbed

Dependencies:   EthernetInterface SDFileSystem mbed-rtos mbed

Committer:
sunyiming
Date:
Tue Mar 06 08:53:46 2018 +0000
Revision:
1:6465a3f5c58a
??OK

Who changed what in which revision?

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