SNMP agent attached to SPI slave

Dependencies:   mbed

Committer:
lorcansmith
Date:
Mon Aug 13 15:07:40 2012 +0000
Revision:
0:2a53a4c3238c
v1.1 release includes ioAlarm traps

Who changed what in which revision?

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