Defines a platform abstraction layer for the Z-Wave random number generation. More...
Functions | |
void | zpal_entropy_init (void) |
Initialize entropy module. | |
zpal_status_t | zpal_get_random_data (uint8_t *data, size_t len) |
Generate true random array of bytes based on the given length and fill a data buffer. Note that this function may shut down the radio while getting the data. | |
uint8_t | zpal_get_pseudo_random (void) |
Returns a pseudo random byte. | |
Defines a platform abstraction layer for the Z-Wave random number generation.
How to use the entropy API:
All the ZPAL entropy APIs are required to be implemented.
The following outlines an example of use:
Requirements:
void zpal_entropy_init | ( | void | ) |
Initialize entropy module.
uint8_t zpal_get_pseudo_random | ( | void | ) |
Returns a pseudo random byte.
zpal_status_t zpal_get_random_data | ( | uint8_t * | data, |
size_t | len ) |
Generate true random array of bytes based on the given length and fill a data buffer. Note that this function may shut down the radio while getting the data.
[out] | data | A pointer to where the random array of bytes are stored in data buffer. It MUST NOT be NULL. |
[in] | len | The requested size of the random array of bytes that shall be stored in the data buffer. |