PolarSSL v1.1.5
md4.h
Go to the documentation of this file.
1 
27 #ifndef POLARSSL_MD4_H
28 #define POLARSSL_MD4_H
29 
30 #include <string.h>
31 
32 #define POLARSSL_ERR_MD4_FILE_IO_ERROR -0x0072
37 typedef struct
38 {
39  unsigned long total[2];
40  unsigned long state[4];
41  unsigned char buffer[64];
43  unsigned char ipad[64];
44  unsigned char opad[64];
45 }
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
57 void md4_starts( md4_context *ctx );
58 
66 void md4_update( md4_context *ctx, const unsigned char *input, size_t ilen );
67 
74 void md4_finish( md4_context *ctx, unsigned char output[16] );
75 
83 void md4( const unsigned char *input, size_t ilen, unsigned char output[16] );
84 
93 int md4_file( const char *path, unsigned char output[16] );
94 
102 void md4_hmac_starts( md4_context *ctx, const unsigned char *key, size_t keylen );
103 
111 void md4_hmac_update( md4_context *ctx, const unsigned char *input, size_t ilen );
112 
119 void md4_hmac_finish( md4_context *ctx, unsigned char output[16] );
120 
126 void md4_hmac_reset( md4_context *ctx );
127 
137 void md4_hmac( const unsigned char *key, size_t keylen,
138  const unsigned char *input, size_t ilen,
139  unsigned char output[16] );
140 
146 int md4_self_test( int verbose );
147 
148 #ifdef __cplusplus
149 }
150 #endif
151 
152 #endif /* md4.h */