mbed TLS v2.1.2
md_internal.h
Go to the documentation of this file.
1 
27 #ifndef MBEDTLS_MD_WRAP_H
28 #define MBEDTLS_MD_WRAP_H
29 
30 #if !defined(MBEDTLS_CONFIG_FILE)
31 #include "config.h"
32 #else
33 #include MBEDTLS_CONFIG_FILE
34 #endif
35 
36 #include "md.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
47 {
50 
52  const char * name;
53 
55  int size;
56 
59 
61  void (*starts_func)( void *ctx );
62 
64  void (*update_func)( void *ctx, const unsigned char *input, size_t ilen );
65 
67  void (*finish_func)( void *ctx, unsigned char *output );
68 
70  void (*digest_func)( const unsigned char *input, size_t ilen,
71  unsigned char *output );
72 
74  void * (*ctx_alloc_func)( void );
75 
77  void (*ctx_free_func)( void *ctx );
78 
80  void (*clone_func)( void *dst, const void *src );
81 
83  void (*process_func)( void *ctx, const unsigned char *input );
84 };
85 
86 #if defined(MBEDTLS_MD2_C)
88 #endif
89 #if defined(MBEDTLS_MD4_C)
91 #endif
92 #if defined(MBEDTLS_MD5_C)
94 #endif
95 #if defined(MBEDTLS_RIPEMD160_C)
97 #endif
98 #if defined(MBEDTLS_SHA1_C)
100 #endif
101 #if defined(MBEDTLS_SHA256_C)
104 #endif
105 #if defined(MBEDTLS_SHA512_C)
108 #endif
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif /* MBEDTLS_MD_WRAP_H */
const mbedtls_md_info_t mbedtls_sha512_info
const mbedtls_md_info_t mbedtls_sha256_info
const mbedtls_md_info_t mbedtls_md4_info
int size
Output length of the digest function in bytes.
Definition: md_internal.h:55
void(* clone_func)(void *dst, const void *src)
Clone state from a context.
Definition: md_internal.h:80
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:64
Compatibility names (set of defines)
const mbedtls_md_info_t mbedtls_md2_info
const char * name
Name of the message digest.
Definition: md_internal.h:52
const mbedtls_md_info_t mbedtls_sha224_info
void(* ctx_free_func)(void *ctx)
Free the given context.
Definition: md_internal.h:77
const mbedtls_md_info_t mbedtls_sha384_info
void(* digest_func)(const unsigned char *input, size_t ilen, unsigned char *output)
Generic digest function.
Definition: md_internal.h:70
const mbedtls_md_info_t mbedtls_md5_info
const mbedtls_md_info_t mbedtls_ripemd160_info
Message digest information.
Definition: md_internal.h:46
void(* finish_func)(void *ctx, unsigned char *output)
Digest finalisation function.
Definition: md_internal.h:67
mbedtls_md_type_t
Definition: md.h:39
int block_size
Block length of the digest function in bytes.
Definition: md_internal.h:58
void(* process_func)(void *ctx, const unsigned char *input)
Internal use only.
Definition: md_internal.h:83
void(* starts_func)(void *ctx)
Digest initialisation function.
Definition: md_internal.h:61
mbedtls_md_type_t type
Digest identifier.
Definition: md_internal.h:49