PolarSSL v1.2.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 #ifdef _MSC_VER
33 #include <basetsd.h>
34 typedef UINT32 uint32_t;
35 #else
36 #include <inttypes.h>
37 #endif
38 
39 #define POLARSSL_ERR_MD4_FILE_IO_ERROR -0x0072
44 typedef struct
45 {
46  uint32_t total[2];
47  uint32_t state[4];
48  unsigned char buffer[64];
50  unsigned char ipad[64];
51  unsigned char opad[64];
52 }
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
64 void md4_starts( md4_context *ctx );
65 
73 void md4_update( md4_context *ctx, const unsigned char *input, size_t ilen );
74 
81 void md4_finish( md4_context *ctx, unsigned char output[16] );
82 
90 void md4( const unsigned char *input, size_t ilen, unsigned char output[16] );
91 
100 int md4_file( const char *path, unsigned char output[16] );
101 
109 void md4_hmac_starts( md4_context *ctx, const unsigned char *key, size_t keylen );
110 
118 void md4_hmac_update( md4_context *ctx, const unsigned char *input, size_t ilen );
119 
126 void md4_hmac_finish( md4_context *ctx, unsigned char output[16] );
127 
133 void md4_hmac_reset( md4_context *ctx );
134 
144 void md4_hmac( const unsigned char *key, size_t keylen,
145  const unsigned char *input, size_t ilen,
146  unsigned char output[16] );
147 
153 int md4_self_test( int verbose );
154 
155 #ifdef __cplusplus
156 }
157 #endif
158 
159 #endif /* md4.h */