00001 #ifndef MD5_H 00002 #define MD5_H 00003 00008 #include "int_sizes.h" 00009 00010 #define MD5_DIGEST_LENGTH 16 00011 00012 typedef struct { 00013 UINT32_T state[4]; 00014 UINT32_T count[2]; 00015 unsigned char buffer[64]; 00016 } md5_context_t; 00017 00018 void md5_init( md5_context_t *ctx ); 00019 void md5_update( md5_context_t *ctx, const unsigned char *, unsigned int ); 00020 void md5_final( unsigned char digest[MD5_DIGEST_LENGTH], md5_context_t *ctx ); 00021 00030 void md5_buffer( const char *buffer, int length, unsigned char digest[MD5_DIGEST_LENGTH] ); 00031 00040 int md5_file( const char *filename, unsigned char digest[MD5_DIGEST_LENGTH] ); 00041 00047 const char * md5_string( unsigned char digest[MD5_DIGEST_LENGTH] ); 00048 00049 #endif