nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ cracen_hash_compute()

psa_status_t cracen_hash_compute ( psa_algorithm_t alg,
const uint8_t * input,
size_t input_length,
uint8_t * hash,
size_t hash_size,
size_t * hash_length )

#include <subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_hash.h>

Compute the hash of a message.

Parameters
[in]algHash algorithm.
[in]inputMessage to hash.
[in]input_lengthLength of the message in bytes.
[out]hashBuffer to store the hash.
[in]hash_sizeSize of the hash buffer in bytes.
[out]hash_lengthLength of the generated hash in bytes.
Return values
PSA_SUCCESSThe operation completed successfully.
PSA_ERROR_NOT_SUPPORTEDThe algorithm is not supported.
PSA_ERROR_BUFFER_TOO_SMALLThe hash buffer is too small.