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