S145 SoftDevice for nRF54L15/nRF54L10/nRF54L05 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_rand_application_vector_get()

uint32_t sd_rand_application_vector_get ( uint8_t * p_buff,
uint8_t length )

#include <nrf_soc.h>

Generate NIST SP 800-90A compliant random numbers.

Parameters
[out]p_buffPointer to uint8_t buffer for storing the bytes.
[in]lengthNumber of bytes to place in p_buff.

Generating secure randoms is expensive in terms of time and power, so if security is not required, a pseudorandom number generator should be used instead.

Return values
NRF_SUCCESSThe requested bytes were written to p_buff.
NRF_ERROR_INVALID_ADDRp_buff invalid.
NRF_ERROR_INVALID_STATEThe random number generator must be seeded using sd_rand_seed_set.