mbed TLS v2.0.0
md5.h
Go to the documentation of this file.
1 
24 #ifndef MBEDTLS_MD5_H
25 #define MBEDTLS_MD5_H
26 
27 #if !defined(MBEDTLS_CONFIG_FILE)
28 #include "config.h"
29 #else
30 #include MBEDTLS_CONFIG_FILE
31 #endif
32 
33 #include <stddef.h>
34 #include <stdint.h>
35 
36 #if !defined(MBEDTLS_MD5_ALT)
37 // Regular implementation
38 //
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
47 typedef struct
48 {
49  uint32_t total[2];
50  uint32_t state[4];
51  unsigned char buffer[64];
52 }
54 
61 
68 
76  const mbedtls_md5_context *src );
77 
84 
92 void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen );
93 
100 void mbedtls_md5_finish( mbedtls_md5_context *ctx, unsigned char output[16] );
101 
102 /* Internal use */
103 void mbedtls_md5_process( mbedtls_md5_context *ctx, const unsigned char data[64] );
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #else /* MBEDTLS_MD5_ALT */
110 #include "md5_alt.h"
111 #endif /* MBEDTLS_MD5_ALT */
112 
113 #ifdef __cplusplus
114 extern "C" {
115 #endif
116 
124 void mbedtls_md5( const unsigned char *input, size_t ilen, unsigned char output[16] );
125 
131 int mbedtls_md5_self_test( int verbose );
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif /* mbedtls_md5.h */
void mbedtls_md5(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD5( input buffer )
Compatibility names (set of defines)
void mbedtls_md5_init(mbedtls_md5_context *ctx)
Initialize MD5 context.
void mbedtls_md5_clone(mbedtls_md5_context *dst, const mbedtls_md5_context *src)
Clone (the state of) an MD5 context.
void mbedtls_md5_free(mbedtls_md5_context *ctx)
Clear MD5 context.
void mbedtls_md5_update(mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen)
MD5 process buffer.
void mbedtls_md5_starts(mbedtls_md5_context *ctx)
MD5 context setup.
MD5 context structure.
Definition: md5.h:47
int mbedtls_md5_self_test(int verbose)
Checkup routine.
void mbedtls_md5_finish(mbedtls_md5_context *ctx, unsigned char output[16])
MD5 final digest.
void mbedtls_md5_process(mbedtls_md5_context *ctx, const unsigned char data[64])