mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 19:21:09 +01:00
Add utility function to check for drivers init
This will be used in the next commit. While at it, move driver initialization before RNG init - this will be handy when the entropy module wants to use drivers for hashes. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
@@ -26,6 +26,18 @@
|
||||
#include "psa/crypto.h"
|
||||
#include "psa/crypto_se_driver.h"
|
||||
|
||||
/**
|
||||
* Tell if PSA is ready for this hash.
|
||||
*
|
||||
* \note For now, only checks the state of the driver subsystem,
|
||||
* not the algorithm. Might do more in the future.
|
||||
*
|
||||
* \param hash_alg The hash algorithm (ignored for now).
|
||||
*
|
||||
* \return 1 if the driver subsytem is ready, 0 otherwise.
|
||||
*/
|
||||
int psa_can_do_hash(psa_algorithm_t hash_alg);
|
||||
|
||||
/** Constant-time buffer comparison
|
||||
*
|
||||
* \param[in] a Left-hand buffer for comparison.
|
||||
|
||||
Reference in New Issue
Block a user