8.2. PSA Crypto library
8.2.1. API version
PSA_CRYPTO_API_VERSION_MAJOR (macro)
The major version of this implementation of the PSA Crypto API.
#define PSA_CRYPTO_API_VERSION_MAJOR 1
PSA_CRYPTO_API_VERSION_MINOR (macro)
The minor version of this implementation of the PSA Crypto API.
#define PSA_CRYPTO_API_VERSION_MINOR 0
8.2.2. Library initialization
psa_crypto_init (function)
Library initialization.
psa_status_t psa_crypto_init(void);
Returns: psa_status_t
-
PSA_SUCCESS -
PSA_ERROR_INSUFFICIENT_MEMORY -
PSA_ERROR_COMMUNICATION_FAILURE -
PSA_ERROR_HARDWARE_FAILURE -
PSA_ERROR_CORRUPTION_DETECTED -
PSA_ERROR_INSUFFICIENT_ENTROPY
Description
Applications must call this function before calling any other function in this module.
Applications are permitted to call this function more than once. Once a call succeeds, subsequent calls are guaranteed to succeed.
If the application calls other functions before calling psa_crypto_init(), the behavior is undefined. In this situation:
- Implementations are encouraged to either perform the operation as if the library had been initialized or to return
PSA_ERROR_BAD_STATEor some other applicable error. - Implementations must not return a success status if the lack of initialization might have security implications, for example due to improper seeding of the random number generator.