Demo Application for the Celeritous Breakout Board

Dependencies:   mbed

Committer:
celeritous
Date:
Fri May 18 03:55:10 2012 +0000
Revision:
0:1a3da73fe36a
Celeritous_BreakoutBoardDemo

Who changed what in which revision?

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