00001
00002
00003
00004
00005
00006
00007 #ifndef MD5_H
00008 #define MD5_H
00009
00014 #include "int_sizes.h"
00015
00016 #define MD5_DIGEST_LENGTH 16
00017
00018 typedef struct {
00019 UINT32_T state[4];
00020 UINT32_T count[2];
00021 unsigned char buffer[64];
00022 } md5_context_t;
00023
00024 void md5_init( md5_context_t *ctx );
00025 void md5_update( md5_context_t *ctx, const unsigned char *, unsigned int );
00026 void md5_final( unsigned char digest[MD5_DIGEST_LENGTH], md5_context_t *ctx );
00027
00036 void md5_buffer( const char *buffer, int length, unsigned char digest[MD5_DIGEST_LENGTH] );
00037
00046 int md5_file( const char *filename, unsigned char digest[MD5_DIGEST_LENGTH] );
00047
00053 const char * md5_string( unsigned char digest[MD5_DIGEST_LENGTH] );
00054
00055 #endif