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