32 #if !defined(MBEDTLS_CONFIG_FILE) 35 #include MBEDTLS_CONFIG_FILE 38 #define MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE -0x5080 39 #define MBEDTLS_ERR_MD_BAD_INPUT_DATA -0x5100 40 #define MBEDTLS_ERR_MD_ALLOC_FAILED -0x5180 41 #define MBEDTLS_ERR_MD_FILE_IO_ERROR -0x5200 44 #define MBEDTLS_ERR_MD_HW_ACCEL_FAILED -0x5280 71 #if defined(MBEDTLS_SHA512_C) 72 #define MBEDTLS_MD_MAX_SIZE 64 74 #define MBEDTLS_MD_MAX_SIZE 32 155 #if ! defined(MBEDTLS_DEPRECATED_REMOVED) 156 #if defined(MBEDTLS_DEPRECATED_WARNING) 157 #define MBEDTLS_DEPRECATED __attribute__((deprecated)) 159 #define MBEDTLS_DEPRECATED 180 #undef MBEDTLS_DEPRECATED 331 unsigned char *output );
333 #if defined(MBEDTLS_FS_IO) 352 unsigned char *output );
458 const unsigned char *input,
size_t ilen,
459 unsigned char *output );
int mbedtls_md_init_ctx(mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info) MBEDTLS_DEPRECATED
This function selects the message digest algorithm to use, and allocates internal structures.
Definition: md.c:216
int mbedtls_md_hmac_reset(mbedtls_md_context_t *ctx)
This function prepares to authenticate a new message with the same key as the previous HMAC operation...
Definition: md.c:398
mbedtls_md_type_t mbedtls_md_get_type(const mbedtls_md_info_t *md_info)
This function extracts the message-digest type from the message-digest information structure.
Definition: md.c:459
int mbedtls_md_starts(mbedtls_md_context_t *ctx)
This function starts a message-digest computation.
Definition: md.c:245
void * hmac_ctx
Definition: md.h:94
int mbedtls_md_hmac_update(mbedtls_md_context_t *ctx, const unsigned char *input, size_t ilen)
This function feeds an input buffer into an ongoing HMAC computation.
Definition: md.c:366
void mbedtls_md_free(mbedtls_md_context_t *ctx)
This function clears the internal structure of ctx and frees any embedded internal structure,...
Definition: md.c:182
void mbedtls_md_init(mbedtls_md_context_t *ctx)
This function initializes a message-digest context without binding it to a particular message-digest ...
Definition: md.c:177
int mbedtls_md_clone(mbedtls_md_context_t *dst, const mbedtls_md_context_t *src)
This function clones the state of an message-digest context.
Definition: md.c:200
void * md_ctx
Definition: md.h:91
Configuration options (set of defines)
int mbedtls_md_process(mbedtls_md_context_t *ctx, const unsigned char *data)
Definition: md.c:443
unsigned char mbedtls_md_get_size(const mbedtls_md_info_t *md_info)
This function extracts the message-digest size from the message-digest information structure.
Definition: md.c:451
int mbedtls_md_hmac_finish(mbedtls_md_context_t *ctx, unsigned char *output)
This function finishes the HMAC operation, and writes the result to the output buffer.
Definition: md.c:374
int mbedtls_md_setup(mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac)
This function selects the message digest algorithm to use, and allocates internal structures.
Definition: md.c:222
int mbedtls_md_hmac(const mbedtls_md_info_t *md_info, const unsigned char *key, size_t keylen, const unsigned char *input, size_t ilen, unsigned char *output)
This function calculates the full generic HMAC on the input buffer with the provided key.
Definition: md.c:414
int mbedtls_md(const mbedtls_md_info_t *md_info, const unsigned char *input, size_t ilen, unsigned char *output)
This function calculates the message-digest of a buffer, with respect to a configurable message-diges...
Definition: md.c:269
int mbedtls_md_finish(mbedtls_md_context_t *ctx, unsigned char *output)
This function finishes the digest operation, and writes the result to the output buffer.
Definition: md.c:261
#define MBEDTLS_DEPRECATED
Definition: md.h:159
const char * mbedtls_md_get_name(const mbedtls_md_info_t *md_info)
This function extracts the message-digest name from the message-digest information structure.
Definition: md.c:467
struct mbedtls_md_context_t mbedtls_md_context_t
const int * mbedtls_md_list(void)
This function returns the list of digests supported by the generic digest module.
Definition: md.c:90
const mbedtls_md_info_t * mbedtls_md_info_from_type(mbedtls_md_type_t md_type)
This function returns the message-digest information associated with the given digest type.
Definition: md.c:136
Definition: md_internal.h:47
int mbedtls_md_hmac_starts(mbedtls_md_context_t *ctx, const unsigned char *key, size_t keylen)
This function sets the HMAC key and prepares to authenticate a new message.
Definition: md.c:319
mbedtls_md_type_t
Supported message digests.
Definition: md.h:58
const mbedtls_md_info_t * mbedtls_md_info_from_string(const char *md_name)
This function returns the message-digest information associated with the given digest name.
Definition: md.c:95
const mbedtls_md_info_t * md_info
Definition: md.h:88
int mbedtls_md_update(mbedtls_md_context_t *ctx, const unsigned char *input, size_t ilen)
This function feeds an input buffer into an ongoing message-digest computation.
Definition: md.c:253