00001 /* MD5.H - header file for MD5C.C 00002 */ 00003 00004 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 00005 rights reserved. 00006 00007 License to copy and use this software is granted provided that it 00008 is identified as the "RSA Data Security, Inc. MD5 Message-Digest 00009 Algorithm" in all material mentioning or referencing this software 00010 or this function. 00011 00012 License is also granted to make and use derivative works provided 00013 that such works are identified as "derived from the RSA Data 00014 Security, Inc. MD5 Message-Digest Algorithm" in all material 00015 mentioning or referencing the derived work. 00016 00017 RSA Data Security, Inc. makes no representations concerning either 00018 the merchantability of this software or the suitability of this 00019 software for any particular purpose. It is provided "as is" 00020 without express or implied warranty of any kind. 00021 00022 These notices must be retained in any copies of any part of this 00023 documentation and/or software. 00024 */ 00025 00026 #ifndef MD5_H 00027 #define MD5_H 00028 00029 #include "hashcom.h" 00030 00031 #ifndef MD5_SMALL 00032 #define MD5_SMALL 0 /* low footprint md5 */ 00033 #endif 00034 00035 #define MD5_DIGEST_SIZE 16 00036 00037 typedef struct { 00038 uns32 state[4]; /* state (ABCD) */ 00039 uns32 count[2]; /* number of bits, modulo 2^64 (lsb first) */ 00040 uns8 buffer[64]; /* input buffer */ 00041 } md5_context; 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00047 #ifdef WIN32 00048 #ifdef CRYPTO_EXPORTS 00049 #define extern extern __declspec(dllexport) 00050 #else 00051 #define extern extern __declspec(dllimport) 00052 #endif 00053 #endif 00054 00055 extern void md5_init(md5_context *context); 00056 extern void md5_update(md5_context *context, uns8 *input, uns32 inputLen); 00057 extern void md5_final(uns8 *digest, md5_context *context); 00058 00059 #ifdef __cplusplus 00060 } 00061 #endif 00062 00063 #ifdef WIN32 00064 #undef extern 00065 #endif 00066 00067 /* 00068 md5(abc) = 900150983cd24fb0d6963f7d28e17f72 00069 */ 00070 00071 #endif
![]() |
Confidential |