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

◆ cracen_hash_input()

int cracen_hash_input ( const uint8_t * input,
const size_t input_length,
const struct sxhashalg * hashalg,
uint8_t * digest )

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

Hash a single input, managing hardware reservation internally.

Convenience wrapper that reserves the cryptomaster hardware, hashes the input using cracen_hash_input_with_context, and releases the hardware. Must only be used when a single hardware reservation is needed for the entire call, do not use if the caller needs to hold the hardware across multiple operations This operation should never be used more than once.

Parameters
[in]inputPointer to element that will be hashed.
[in]input_lengthLength of element to be hashed.
[in]hashalgHash algorithm to be used in sxhashalg format.
[out]digestBuffer of at least sx_hash_get_alg_digestsz(hashalg) bytes.
Returns
sxsymcrypt status code.