00001
00004 #ifndef XYSSL_MD4_H
00005 #define XYSSL_MD4_H
00006
00010 typedef struct
00011 {
00012 unsigned long total[2];
00013 unsigned long state[4];
00014 unsigned char buffer[64];
00016 unsigned char ipad[64];
00017 unsigned char opad[64];
00018 }
00019 md4_context;
00020
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024
00030 void md4_starts( md4_context *ctx );
00031
00039 void md4_update( md4_context *ctx, unsigned char *input, int ilen );
00040
00047 void md4_finish( md4_context *ctx, unsigned char output[16] );
00048
00056 void md4( unsigned char *input, int ilen, unsigned char output[16] );
00057
00067 int md4_file( char *path, unsigned char output[16] );
00068
00076 void md4_hmac_starts( md4_context *ctx, unsigned char *key, int keylen );
00077
00085 void md4_hmac_update( md4_context *ctx, unsigned char *input, int ilen );
00086
00093 void md4_hmac_finish( md4_context *ctx, unsigned char output[16] );
00094
00104 void md4_hmac( unsigned char *key, int keylen,
00105 unsigned char *input, int ilen,
00106 unsigned char output[16] );
00107
00113 int md4_self_test( int verbose );
00114
00115 #ifdef __cplusplus
00116 }
00117 #endif
00118
00119 #endif