openHiTLS API openHiTLS 0.1.0-Alpha1

◆ CRYPT_EAL_MdFinal()

int32_t CRYPT_EAL_MdFinal ( CRYPT_EAL_MdCTX ctx,
uint8_t *  out,
uint32_t *  len 
)

Complete the digest and output the final digest result.

参数
ctx[IN/OUT] MD context, which is created by using the CRYPT_EAL_MdNewCtx interface.
out[OUT] Digest result cache, which needs to be created and managed by users.
len[IN/OUT] The input parameter indicates the length of the buffer marked as "out", and the output parameter indicates the valid length of the obtained "out". The length must be greater than or equal to the hash length of the corresponding algorithm, the hash length can be obtained through the CRYPT_EAL_MdGetDigestSize interface. Requires user creation management.
返回值
#CRYPT_SUCCESS.For other error codes, see crypt_errno.h.