Functions#

This section provides a reference to the TRNG Crypto API functions.

Functions#

sl_status_t
sl_si91x_trng_init(sl_si91x_trng_config_t *config, uint32_t *output)

This API Initializes the TRNG hardware engine.

sl_status_t

This API checks the Entropy of TRNG and verifies TRNG functioning.

sl_status_t
sl_si91x_trng_program_key(uint32_t *trng_key, uint16_t key_length)

This API initializes and programs the key required for TRNG hardware engine.

sl_status_t
sl_si91x_trng_get_random_num(uint32_t *random_number, uint16_t length)

This API generates random number of desired length.

sl_status_t
sl_si91x_duplicate_element(uint32_t *a, uint32_t length)

This API checks if there are any repeating elements in the Array.

Function Documentation#

sl_si91x_trng_init#

sl_status_t sl_si91x_trng_init (sl_si91x_trng_config_t * config, uint32_t * output)

This API Initializes the TRNG hardware engine.

Parameters
[in]config

Configuration object of type sl_si91x_trng_config_t

[out]output

Buffer to store the output.

Returns


Definition at line 62 of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h

sl_si91x_trng_entropy#

sl_status_t sl_si91x_trng_entropy (void )

This API checks the Entropy of TRNG and verifies TRNG functioning.

Parameters
N/A

Returns


Definition at line 70 of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h

sl_si91x_trng_program_key#

sl_status_t sl_si91x_trng_program_key (uint32_t * trng_key, uint16_t key_length)

This API initializes and programs the key required for TRNG hardware engine.

Parameters
[in]trng_key

- Pointer to trng_key

[in]key_length

- key_length - key length in Dwords (uint32_t)

Returns


Definition at line 80 of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h

sl_si91x_trng_get_random_num#

sl_status_t sl_si91x_trng_get_random_num (uint32_t * random_number, uint16_t length)

This API generates random number of desired length.

Parameters
[in]random_number

- Address for Random number

[in]length

- length of random number in bytes

Returns


Definition at line 90 of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h

sl_si91x_duplicate_element#

sl_status_t sl_si91x_duplicate_element (uint32_t * a, uint32_t length)

This API checks if there are any repeating elements in the Array.

Parameters
[in]a
[in]length

of the Array

Returns


Definition at line 100 of file components/device/silabs/si91x/wireless/crypto/trng/inc/sl_si91x_trng.h