AIROC™ BTSDK v4.0 - 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 will instead use the Bluetooth clock as a "seed" and generate 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 | - Pointer to an array to be populated with the random numbers. |
length | - Length of the array pointed to by randNumberArrayPtr. |