00001 /* MD5.H - header file for MD5C.C 00002 * $OpenBSD: md5.h,v 1.3 1996/09/30 03:55:48 millert Exp $ 00003 */ 00004 00005 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 00006 rights reserved. 00007 00008 License to copy and use this software is granted provided that it 00009 is identified as the "RSA Data Security, Inc. MD5 Message-Digest 00010 Algorithm" in all material mentioning or referencing this software 00011 or this function. 00012 00013 License is also granted to make and use derivative works provided 00014 that such works are identified as "derived from the RSA Data 00015 Security, Inc. MD5 Message-Digest Algorithm" in all material 00016 mentioning or referencing the derived work. 00017 00018 RSA Data Security, Inc. makes no representations concerning either 00019 the merchantability of this software or the suitability of this 00020 software for any particular purpose. It is provided "as is" 00021 without express or implied warranty of any kind. 00022 00023 These notices must be retained in any copies of any part of this 00024 documentation and/or software. 00025 */ 00026 00027 #ifndef _MD5_H_ 00028 #define _MD5_H_ 00029 00030 #include <aversive.h> 00031 00032 /* MD5 context. */ 00033 typedef struct MD5Context { 00034 uint32_t state[4]; /* state (ABCD) */ 00035 uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ 00036 unsigned char buffer[64]; /* input buffer */ 00037 } MD5_CTX; 00038 00039 #define MD5_SIZE 16 00040 00041 void MD5Init (MD5_CTX *); 00042 void MD5Update (MD5_CTX *, const unsigned char *, unsigned int); 00043 void MD5Final (unsigned char [MD5_SIZE], MD5_CTX *); 00044 char * MD5End (MD5_CTX *, char *); 00045 char * MD5File (char *, char *); 00046 char * MD5Data (const unsigned char *, unsigned int, char *); 00047 00048 #endif /* _MD5_H_ */