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