PolarSSL v1.1.4
md4.h
Go to the documentation of this file.
00001 
00027 #ifndef POLARSSL_MD4_H
00028 #define POLARSSL_MD4_H
00029 
00030 #include <string.h>
00031 
00032 #define POLARSSL_ERR_MD4_FILE_IO_ERROR                 -0x0072  
00037 typedef struct
00038 {
00039     unsigned long total[2];     
00040     unsigned long state[4];     
00041     unsigned char buffer[64];   
00043     unsigned char ipad[64];     
00044     unsigned char opad[64];     
00045 }
00046 md4_context;
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051 
00057 void md4_starts( md4_context *ctx );
00058 
00066 void md4_update( md4_context *ctx, const unsigned char *input, size_t ilen );
00067 
00074 void md4_finish( md4_context *ctx, unsigned char output[16] );
00075 
00083 void md4( const unsigned char *input, size_t ilen, unsigned char output[16] );
00084 
00093 int md4_file( const char *path, unsigned char output[16] );
00094 
00102 void md4_hmac_starts( md4_context *ctx, const unsigned char *key, size_t keylen );
00103 
00111 void md4_hmac_update( md4_context *ctx, const unsigned char *input, size_t ilen );
00112 
00119 void md4_hmac_finish( md4_context *ctx, unsigned char output[16] );
00120 
00126 void md4_hmac_reset( md4_context *ctx );
00127 
00137 void md4_hmac( const unsigned char *key, size_t keylen,
00138                const unsigned char *input, size_t ilen,
00139                unsigned char output[16] );
00140 
00146 int md4_self_test( int verbose );
00147 
00148 #ifdef __cplusplus
00149 }
00150 #endif
00151 
00152 #endif /* md4.h */