PolarSSL v1.1.5
md5.h
Go to the documentation of this file.
1 
27 #ifndef POLARSSL_MD5_H
28 #define POLARSSL_MD5_H
29 
30 #include <string.h>
31 
32 #define POLARSSL_ERR_MD5_FILE_IO_ERROR -0x0074
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 md5_starts( md5_context *ctx );
58 
66 void md5_update( md5_context *ctx, const unsigned char *input, size_t ilen );
67 
74 void md5_finish( md5_context *ctx, unsigned char output[16] );
75 
83 void md5( const unsigned char *input, size_t ilen, unsigned char output[16] );
84 
93 int md5_file( const char *path, unsigned char output[16] );
94 
102 void md5_hmac_starts( md5_context *ctx,
103  const unsigned char *key, size_t keylen );
104 
112 void md5_hmac_update( md5_context *ctx,
113  const unsigned char *input, size_t ilen );
114 
121 void md5_hmac_finish( md5_context *ctx, unsigned char output[16] );
122 
128 void md5_hmac_reset( md5_context *ctx );
129 
139 void md5_hmac( const unsigned char *key, size_t keylen,
140  const unsigned char *input, size_t ilen,
141  unsigned char output[16] );
142 
148 int md5_self_test( int verbose );
149 
150 #ifdef __cplusplus
151 }
152 #endif
153 
154 #endif /* md5.h */