Provides functions to initialize rng subsystem and generate random data. More...
Functions |
|
| uint32_t | nrf_crypto_rng_init (void) |
|
Initialize the random number generator.
More...
|
|
| uint32_t | nrf_crypto_rng_vector_generate (uint8_t *p_target, uint32_t length) |
|
Generate random data into a buffer, given length as an input.
More...
|
|
Detailed Description
Provides functions to initialize rng subsystem and generate random data.
Function Documentation
| uint32_t nrf_crypto_rng_init | ( | void | ) |
Initialize the random number generator.
- Note
- This function is called by nrf_crypto_init .
- Return values
-
NRF_SUCCESS If random number generator was initialized successfully. NRF_ERROR_INTERNAL If an internal error occured in the nrf_crypto backend.
| uint32_t nrf_crypto_rng_vector_generate | ( | uint8_t * | p_target , |
| uint32_t | length | ||
| ) |
Generate random data into a buffer, given length as an input.
- Parameters
-
[in,out] p_target Pointer to a buffer to accept the random generated data. This buffer must be the same length as the length input. [in] length Length (in bytes) to generate random data for.
- Return values
-
NRF_SUCCESS Data was generated successfully. NRF_ERROR_NULL p_target was NULL. NRF_ERROR_INTERNAL If an internal error occured in the nrf_crypto backend.