PolarSSL
|
00001 00025 #ifndef POLARSSL_MD5_H 00026 #define POLARSSL_MD5_H 00027 00031 typedef struct 00032 { 00033 unsigned long total[2]; 00034 unsigned long state[4]; 00035 unsigned char buffer[64]; 00037 unsigned char ipad[64]; 00038 unsigned char opad[64]; 00039 } 00040 md5_context; 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00051 void md5_starts( md5_context *ctx ); 00052 00060 void md5_update( md5_context *ctx, const unsigned char *input, int ilen ); 00061 00068 void md5_finish( md5_context *ctx, unsigned char output[16] ); 00069 00077 void md5( const unsigned char *input, int ilen, unsigned char output[16] ); 00078 00088 int md5_file( const char *path, unsigned char output[16] ); 00089 00097 void md5_hmac_starts( md5_context *ctx, 00098 const unsigned char *key, int keylen ); 00099 00107 void md5_hmac_update( md5_context *ctx, 00108 const unsigned char *input, int ilen ); 00109 00116 void md5_hmac_finish( md5_context *ctx, unsigned char output[16] ); 00117 00123 void md5_hmac_reset( md5_context *ctx ); 00124 00134 void md5_hmac( const unsigned char *key, int keylen, 00135 const unsigned char *input, int ilen, 00136 unsigned char output[16] ); 00137 00143 int md5_self_test( int verbose ); 00144 00145 #ifdef __cplusplus 00146 } 00147 #endif 00148 00149 #endif /* md5.h */