mbedtls_psa_hash_compute() function
Calculate the hash (digest) of a message using Mbed TLS routines.
Arguments
alg
The hash algorithm to compute (\c PSA_ALG_XXX value such that #PSA_ALG_IS_HASH(\p alg) is true).
input
Buffer containing the message to hash.
input_length
Size of the \p input buffer in bytes.
hash
Buffer where the hash is to be written.
hash_size
Size of the \p hash buffer in bytes.
hash_length
On success, the number of bytes that make up the hash value. This is always #PSA_HASH_LENGTH(\p alg).
Return value
#PSA_SUCCESS Success. #PSA_ERROR_NOT_SUPPORTED \p alg is not supported #PSA_ERROR_BUFFER_TOO_SMALL \p hash_size is too small #PSA_ERROR_INSUFFICIENT_MEMORY \emptydescription #PSA_ERROR_CORRUPTION_DETECTED \emptydescription
Notes
The signature of this function is that of a PSA driver hash_compute entry point. This function behaves as a hash_compute entry point as defined in the PSA driver interface specification for transparent drivers.
mbedtls_psa_hash_compute() is called by 1 function and calls 4 functions:
![]()
mbedtls_psa_hash_compute()
mbedtls_psa_hash_compute():
![]()
mbedtls_psa_hash_compute()