AIROC™ BTSDK v4.9 - Documentation | ||||
Defines a driver for the Random Number Generator (RNG). More...
Functions | |
uint32_t | wiced_hal_rand_gen_num (void) |
Generates and returns a random 32-bit integer. More... | |
void | wiced_hal_rand_gen_num_array (uint32_t *randNumberArrayPtr, uint32_t length) |
Fills a given array with randomly generated 32-bit integers. More... | |
uint32_t | wiced_hal_get_pseudo_rand_number (void) |
This functin returns a pseudo random number. More... | |
Defines a driver for the Random Number Generator (RNG).
The RNG uses a special hardware module to generate either a single 32-bit random number or fill a given array with 32-bit random numbers. These are useful for applications such as authentication.
uint32_t wiced_hal_get_pseudo_rand_number | ( | void | ) |
This functin returns a pseudo random number.
none |
uint32_t wiced_hal_rand_gen_num | ( | void | ) |
Generates and returns a random 32-bit integer.
Internal functions check that the generating hardware is warmed up and ready before returning the random value. If the hardware is too "cold" at the time of use, the function instead uses the Bluetooth clock as a "seed" and generates a "soft" random number.
None. |
void wiced_hal_rand_gen_num_array | ( | uint32_t * | randNumberArrayPtr, |
uint32_t | length | ||
) |
Fills a given array with randomly generated 32-bit integers.
Uses the function wiced_hal_rand_gen_num().
randNumberArrayPtr | - The pointer to an array to be populated with random numbers. |
length | - The length of the array pointed to by randNumberArrayPtr. |