24#define MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE -0x5080
26#define MBEDTLS_ERR_MD_BAD_INPUT_DATA -0x5100
28#define MBEDTLS_ERR_MD_ALLOC_FAILED -0x5180
30#define MBEDTLS_ERR_MD_FILE_IO_ERROR -0x5200
70#if defined(MBEDTLS_MD_CAN_SHA512) || defined(MBEDTLS_MD_CAN_SHA3_512)
71#define MBEDTLS_MD_MAX_SIZE 64
72#elif defined(MBEDTLS_MD_CAN_SHA384) || defined(MBEDTLS_MD_CAN_SHA3_384)
73#define MBEDTLS_MD_MAX_SIZE 48
74#elif defined(MBEDTLS_MD_CAN_SHA256) || defined(MBEDTLS_MD_CAN_SHA3_256)
75#define MBEDTLS_MD_MAX_SIZE 32
76#elif defined(MBEDTLS_MD_CAN_SHA224) || defined(MBEDTLS_MD_CAN_SHA3_224)
77#define MBEDTLS_MD_MAX_SIZE 28
79#define MBEDTLS_MD_MAX_SIZE 20
83#if defined(MBEDTLS_MD_CAN_SHA3_224)
84#define MBEDTLS_MD_MAX_BLOCK_SIZE 144
85#elif defined(MBEDTLS_MD_CAN_SHA3_256)
86#define MBEDTLS_MD_MAX_BLOCK_SIZE 136
87#elif defined(MBEDTLS_MD_CAN_SHA512) || defined(MBEDTLS_MD_CAN_SHA384)
88#define MBEDTLS_MD_MAX_BLOCK_SIZE 128
89#elif defined(MBEDTLS_MD_CAN_SHA3_384)
90#define MBEDTLS_MD_MAX_BLOCK_SIZE 104
91#elif defined(MBEDTLS_MD_CAN_SHA3_512)
92#define MBEDTLS_MD_MAX_BLOCK_SIZE 72
94#define MBEDTLS_MD_MAX_BLOCK_SIZE 64
126#if defined(MBEDTLS_MD_SOME_PSA)
134#if defined(MBEDTLS_MD_C)
246static inline unsigned char mbedtls_md_get_size_from_type(
mbedtls_md_type_t md_type)
338 unsigned char *output);
388#if defined(MBEDTLS_FS_IO)
408 unsigned char *output);
519 const unsigned char *
input,
size_t ilen,
520 unsigned char *output);
struct i915_engine_class_instance engine
Definition i915_drm.h:1
Build-time configuration info.
const int * mbedtls_md_list(void)
This function returns the list of digests supported by the generic digest module.
MBEDTLS_CHECK_RETURN_TYPICAL 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.
MBEDTLS_CHECK_RETURN_TYPICAL 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.
mbedtls_md_type_t
Supported message digests.
Definition md.h:47
@ MBEDTLS_MD_SHA512
Definition md.h:55
@ MBEDTLS_MD_MD5
Definition md.h:49
@ MBEDTLS_MD_RIPEMD160
Definition md.h:50
@ MBEDTLS_MD_SHA384
Definition md.h:54
@ MBEDTLS_MD_SHA3_384
Definition md.h:58
@ MBEDTLS_MD_NONE
Definition md.h:48
@ MBEDTLS_MD_SHA3_512
Definition md.h:59
@ MBEDTLS_MD_SHA256
Definition md.h:53
@ MBEDTLS_MD_SHA224
Definition md.h:52
@ MBEDTLS_MD_SHA1
Definition md.h:51
@ MBEDTLS_MD_SHA3_224
Definition md.h:56
@ MBEDTLS_MD_SHA3_256
Definition md.h:57
MBEDTLS_CHECK_RETURN_TYPICAL 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.
const char * mbedtls_md_get_name(const mbedtls_md_info_t *md_info)
This function returns the name of the message digest for the message-digest information structure giv...
MBEDTLS_CHECK_RETURN_TYPICAL 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...
MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md_starts(mbedtls_md_context_t *ctx)
This function starts a message-digest computation.
MBEDTLS_CHECK_RETURN_TYPICAL 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.
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.
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.
MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md_clone(mbedtls_md_context_t *dst, const mbedtls_md_context_t *src)
This function clones the state of a message-digest context.
MBEDTLS_CHECK_RETURN_TYPICAL 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.
MBEDTLS_CHECK_RETURN_TYPICAL 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...
mbedtls_md_engine_t
Definition md.h:113
@ MBEDTLS_MD_ENGINE_LEGACY
Definition md.h:114
@ MBEDTLS_MD_ENGINE_PSA
Definition md.h:115
MBEDTLS_CHECK_RETURN_TYPICAL 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.
void mbedtls_md_init(mbedtls_md_context_t *ctx)
This function initializes a message-digest context without binding it to a particular message-digest ...
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.
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.
const mbedtls_md_info_t * mbedtls_md_info_from_ctx(const mbedtls_md_context_t *ctx)
This function returns the message-digest information from the given context.
void mbedtls_md_free(mbedtls_md_context_t *ctx)
This function clears the internal structure of ctx and frees any embedded internal structure,...
MBEDTLS_CHECK_RETURN_TYPICAL 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.
Macro wrapper for struct's members.
#define MBEDTLS_PRIVATE(member)
Definition private_access.h:15
struct VirtioInputEvent * input
Definition virtiokbd.c:46