Trident IoT Z-Wave SDK
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Zpal-entropy

Defines a platform abstraction layer for the Z-Wave random number generation. More...

+ Collaboration diagram for Zpal-entropy:

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.
 

Detailed Description

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:

  1. Initialize module with zpal_entropy_init().
  2. Invoke zpal_get_random_data() or zpal_get_pseudo_random() to get generated data.

Requirements:

Function Documentation

◆ zpal_entropy_init()

void zpal_entropy_init ( void )

Initialize entropy module.

◆ zpal_get_pseudo_random()

uint8_t zpal_get_pseudo_random ( void )

Returns a pseudo random byte.

Returns
Pseudo random byte.

◆ zpal_get_random_data()

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.

Parameters
[out]dataA pointer to where the random array of bytes are stored in data buffer. It MUST NOT be NULL.
[in]lenThe requested size of the random array of bytes that shall be stored in the data buffer.
Returns
ZPAL_STATUS_OK if the random array of bytes are generated and stored in the data buffer. ZPAL_STATUS_OK if the random array of bytes are not generated.