Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

md5.h

Go to the documentation of this file.
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 1 00028 00029 #include <sys/types.h> 00030 #include <inttypes.h> 00031 00032 /* POINTER defines a generic pointer type */ 00033 typedef unsigned char *POINTER; 00034 00035 #ifndef HAVE_UINT32_T 00036 # if SIZEOF_INT == 4 00037 typedef unsigned int uint32_t; 00038 # elif SIZEOF_LONG == 4 00039 typedef unsigned long int uint32_t; 00040 # endif 00041 #endif 00042 00043 /* MD5 context. */ 00044 typedef struct { 00045 uint32_t state[4]; /* state (ABCD) */ 00046 uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ 00047 unsigned char buffer[64]; /* input buffer */ 00048 } MD5_CTX; 00049 00050 void MD5Init (MD5_CTX *); 00051 void MD5Update (MD5_CTX *, unsigned char *, unsigned int); 00052 void MD5Final (unsigned char [16], MD5_CTX *); 00053 00054 /* added to define the conversion wrapper */ 00055 void gethash (char [33], char *, char *); 00056 00057 #endif

Generated on Sun Aug 8 15:22:26 2004 for mailfilter by doxygen 1.3.8