Skip to main content

psa_can_do_hash

Function psa_can_do_hash 

Source
pub unsafe extern "C" fn psa_can_do_hash(hash_alg: u32) -> i32
Expand description

Check if PSA is capable of handling the specified hash algorithm.

This means that PSA core was built with the corresponding PSA_WANT_ALG_xxx set and that psa_crypto_init has already been called.

\note When using Mbed TLS version of PSA core (i.e. MBEDTLS_PSA_CRYPTO_C is set) for now this function only checks the state of the driver subsystem, not the algorithm. This might be improved in the future.

\param hash_alg The hash algorithm.

\return 1 if the PSA can handle \p hash_alg, 0 otherwise.