mbed TLS v2.0.0
md2.h
Go to the documentation of this file.
1 
24 #ifndef MBEDTLS_MD2_H
25 #define MBEDTLS_MD2_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 
35 #if !defined(MBEDTLS_MD2_ALT)
36 // Regular implementation
37 //
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
46 typedef struct
47 {
48  unsigned char cksum[16];
49  unsigned char state[48];
50  unsigned char buffer[16];
51  size_t left;
52 }
54 
61 
68 
76  const mbedtls_md2_context *src );
77 
84 
92 void mbedtls_md2_update( mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen );
93 
100 void mbedtls_md2_finish( mbedtls_md2_context *ctx, unsigned char output[16] );
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #else /* MBEDTLS_MD2_ALT */
107 #include "md2_alt.h"
108 #endif /* MBEDTLS_MD2_ALT */
109 
110 #ifdef __cplusplus
111 extern "C" {
112 #endif
113 
121 void mbedtls_md2( const unsigned char *input, size_t ilen, unsigned char output[16] );
122 
128 int mbedtls_md2_self_test( int verbose );
129 
130 /* Internal use */
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif /* mbedtls_md2.h */
size_t left
Definition: md2.h:51
void mbedtls_md2(const unsigned char *input, size_t ilen, unsigned char output[16])
Output = MD2( input buffer )
void mbedtls_md2_starts(mbedtls_md2_context *ctx)
MD2 context setup.
void mbedtls_md2_finish(mbedtls_md2_context *ctx, unsigned char output[16])
MD2 final digest.
Compatibility names (set of defines)
int mbedtls_md2_self_test(int verbose)
Checkup routine.
void mbedtls_md2_init(mbedtls_md2_context *ctx)
Initialize MD2 context.
void mbedtls_md2_clone(mbedtls_md2_context *dst, const mbedtls_md2_context *src)
Clone (the state of) an MD2 context.
void mbedtls_md2_update(mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen)
MD2 process buffer.
MD2 context structure.
Definition: md2.h:46
void mbedtls_md2_free(mbedtls_md2_context *ctx)
Clear MD2 context.
void mbedtls_md2_process(mbedtls_md2_context *ctx)