md_internal.h
Go to the documentation of this file.
#ifndef MBEDTLS_MD_WRAP_H
#define MBEDTLS_MD_WRAP_H
#if !defined(MBEDTLS_CONFIG_FILE)
#include "config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "md.h"
#ifdef __cplusplus
extern "C" {
#endif
struct mbedtls_md_info_t
{
mbedtls_md_type_t type;
const char * name;
int size;
int block_size;
void (*starts_func)( void *ctx );
void (*update_func)( void *ctx, const unsigned char *input, size_t ilen );
void (*finish_func)( void *ctx, unsigned char *output );
void (*digest_func)( const unsigned char *input, size_t ilen,
unsigned char *output );
void * (*ctx_alloc_func)( void );
void (*ctx_free_func)( void *ctx );
void (*clone_func)( void *dst, const void *src );
void (*process_func)( void *ctx, const unsigned char *input );
};
#if defined(MBEDTLS_MD2_C)
extern const mbedtls_md_info_t mbedtls_md2_info;
#endif
#if defined(MBEDTLS_MD4_C)
extern const mbedtls_md_info_t mbedtls_md4_info;
#endif
#if defined(MBEDTLS_MD5_C)
extern const mbedtls_md_info_t mbedtls_md5_info;
#endif
#if defined(MBEDTLS_RIPEMD160_C)
extern const mbedtls_md_info_t mbedtls_ripemd160_info;
#endif
#if defined(MBEDTLS_SHA1_C)
extern const mbedtls_md_info_t mbedtls_sha1_info;
#endif
#if defined(MBEDTLS_SHA256_C)
extern const mbedtls_md_info_t mbedtls_sha224_info;
extern const mbedtls_md_info_t mbedtls_sha256_info;
#endif
#if defined(MBEDTLS_SHA512_C)
extern const mbedtls_md_info_t mbedtls_sha384_info;
extern const mbedtls_md_info_t mbedtls_sha512_info;
#endif
#ifdef __cplusplus
}
#endif
#endif /* MBEDTLS_MD_WRAP_H */
mbedtls_sha512_info
const mbedtls_md_info_t mbedtls_sha512_info
mbedtls_sha256_info
const mbedtls_md_info_t mbedtls_sha256_info
mbedtls_md4_info
const mbedtls_md_info_t mbedtls_md4_info
mbedtls_md_info_t::size
int size
Output length of the digest function in bytes.
Definition: md_internal.h:55
mbedtls_md_info_t::clone_func
void(* clone_func)(void *dst, const void *src)
Clone state from a context.
Definition: md_internal.h:80
mbedtls_sha1_info
const mbedtls_md_info_t mbedtls_sha1_info
mbedtls_md_info_t::update_func
void(* update_func)(void *ctx, const unsigned char *input, size_t ilen)
Digest update function.
Definition: md_internal.h:64
config.h
Configuration options (set of defines)
mbedtls_md2_info
const mbedtls_md_info_t mbedtls_md2_info
mbedtls_md_info_t::name
const char * name
Name of the message digest.
Definition: md_internal.h:52
mbedtls_sha224_info
const mbedtls_md_info_t mbedtls_sha224_info
mbedtls_md_info_t::ctx_free_func
void(* ctx_free_func)(void *ctx)
Free the given context.
Definition: md_internal.h:77
mbedtls_sha384_info
const mbedtls_md_info_t mbedtls_sha384_info
mbedtls_md_info_t::digest_func
void(* digest_func)(const unsigned char *input, size_t ilen, unsigned char *output)
Generic digest function.
Definition: md_internal.h:70
mbedtls_md5_info
const mbedtls_md_info_t mbedtls_md5_info
mbedtls_ripemd160_info
const mbedtls_md_info_t mbedtls_ripemd160_info
md.h
Generic message digest wrapper.
mbedtls_md_info_t
Message digest information.
Definition: md_internal.h:46
mbedtls_md_info_t::finish_func
void(* finish_func)(void *ctx, unsigned char *output)
Digest finalisation function.
Definition: md_internal.h:67
mbedtls_md_type_t
mbedtls_md_type_t
Definition: md.h:39
mbedtls_md_info_t::block_size
int block_size
Block length of the digest function in bytes.
Definition: md_internal.h:58
mbedtls_md_info_t::process_func
void(* process_func)(void *ctx, const unsigned char *input)
Internal use only.
Definition: md_internal.h:83
mbedtls_md_info_t::starts_func
void(* starts_func)(void *ctx)
Digest initialisation function.
Definition: md_internal.h:61
mbedtls_md_info_t::type
mbedtls_md_type_t type
Digest identifier.
Definition: md_internal.h:49