PolarSSL
|
00001 00025 #ifndef POLARSSL_MD4_H 00026 #define POLARSSL_MD4_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 md4_context; 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00051 void md4_starts( md4_context *ctx ); 00052 00060 void md4_update( md4_context *ctx, const unsigned char *input, int ilen ); 00061 00068 void md4_finish( md4_context *ctx, unsigned char output[16] ); 00069 00077 void md4( const unsigned char *input, int ilen, unsigned char output[16] ); 00078 00088 int md4_file( const char *path, unsigned char output[16] ); 00089 00097 void md4_hmac_starts( md4_context *ctx, const unsigned char *key, int keylen ); 00098 00106 void md4_hmac_update( md4_context *ctx, const unsigned char *input, int ilen ); 00107 00114 void md4_hmac_finish( md4_context *ctx, unsigned char output[16] ); 00115 00121 void md4_hmac_reset( md4_context *ctx ); 00122 00132 void md4_hmac( const unsigned char *key, int keylen, 00133 const unsigned char *input, int ilen, 00134 unsigned char output[16] ); 00135 00141 int md4_self_test( int verbose ); 00142 00143 #ifdef __cplusplus 00144 } 00145 #endif 00146 00147 #endif /* md4.h */