mbed TLS v2.0.0
md_internal.h
Go to the documentation of this file.
1 
28 #ifndef MBEDTLS_MD_WRAP_H
29 #define MBEDTLS_MD_WRAP_H
30 
31 #if !defined(MBEDTLS_CONFIG_FILE)
32 #include "config.h"
33 #else
34 #include MBEDTLS_CONFIG_FILE
35 #endif
36 
37 #include "md.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
48 {
51 
53  const char * name;
54 
56  int size;
57 
60 
62  void (*starts_func)( void *ctx );
63 
65  void (*update_func)( void *ctx, const unsigned char *input, size_t ilen );
66 
68  void (*finish_func)( void *ctx, unsigned char *output );
69 
71  void (*digest_func)( const unsigned char *input, size_t ilen,
72  unsigned char *output );
73 
75  void * (*ctx_alloc_func)( void );
76 
78  void (*ctx_free_func)( void *ctx );
79 
81  void (*clone_func)( void *dst, const void *src );
82 
84  void (*process_func)( void *ctx, const unsigned char *input );
85 };
86 
87 #if defined(MBEDTLS_MD2_C)
88 extern const mbedtls_md_info_t mbedtls_md2_info;
89 #endif
90 #if defined(MBEDTLS_MD4_C)
91 extern const mbedtls_md_info_t mbedtls_md4_info;
92 #endif
93 #if defined(MBEDTLS_MD5_C)
95 #endif
96 #if defined(MBEDTLS_RIPEMD160_C)
98 #endif
99 #if defined(MBEDTLS_SHA1_C)
101 #endif
102 #if defined(MBEDTLS_SHA256_C)
105 #endif
106 #if defined(MBEDTLS_SHA512_C)
109 #endif
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif /* MBEDTLS_MD_WRAP_H */
void(* ctx_free_func)(void *ctx)
Free the given context.
Definition: md_internal.h:78
const mbedtls_md_info_t mbedtls_sha512_info
const mbedtls_md_info_t mbedtls_sha256_info
int size
Output length of the digest function in bytes.
Definition: md_internal.h:56
const mbedtls_md_info_t mbedtls_sha1_info
void(* update_func)(void *ctx, const unsigned char *input, size_t ilen)
Digest update function.
Definition: md_internal.h:65
void(* finish_func)(void *ctx, unsigned char *output)
Digest finalisation function.
Definition: md_internal.h:68
Compatibility names (set of defines)
const char * name
Name of the message digest.
Definition: md_internal.h:53
const mbedtls_md_info_t mbedtls_sha224_info
void(* digest_func)(const unsigned char *input, size_t ilen, unsigned char *output)
Generic digest function.
Definition: md_internal.h:71
const mbedtls_md_info_t mbedtls_sha384_info
void(* starts_func)(void *ctx)
Digest initialisation function.
Definition: md_internal.h:62
void(* process_func)(void *ctx, const unsigned char *input)
Internal use only.
Definition: md_internal.h:84
const mbedtls_md_info_t mbedtls_md5_info
const mbedtls_md_info_t mbedtls_ripemd160_info
void(* clone_func)(void *dst, const void *src)
Clone state from a context.
Definition: md_internal.h:81
Message digest information.
Definition: md_internal.h:47
mbedtls_md_type_t
Definition: md.h:44
int block_size
Block length of the digest function in bytes.
Definition: md_internal.h:59
mbedtls_md_type_t type
Digest identifier.
Definition: md_internal.h:50