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