openHiTLS API openHiTLS 0.1.0-Alpha1

◆ CRYPT_EAL_MacUpdate()

int32_t CRYPT_EAL_MacUpdate ( CRYPT_EAL_MacCtx ctx,
const uint8_t *  in,
uint32_t  len 
)

Continuously input the MAC data.

This command is used only after the CRYPT_EAL_MacInit interface is successfully called.

参数
ctx[IN] MAC context
in[IN] Input data, when the variable is null, the len parameter must be 0. Otherwise, an error is reported.
len[IN] Input data length, the value can be 0.
返回值
CRYPT_SUCCESS,succeededin updating the internal status of the digest.
CRYPT_NULL_INPUT,theinput parameter is NULL.
CRYPT_EAL_ERR_STATE,statuserror.
CRYPT_SHA1_INPUT_OVERFLOW,thelength of the HMAC-SHA1 input data exceeds the maximum value.
CRYPT_SHA2_INPUT_OVERFLOW,thelength of the HMAC-SHA224, HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512 input data exceeds the maximum value, Other error codes see the crypt_errno.h.