nRF5 SDK for Thread v0.11.0
Functions

This module includes the platform abstraction for random number generation. More...

Functions

uint32_t otPlatRandomGet (void)
 
otError otPlatRandomGetTrue (uint8_t *aOutput, uint16_t aOutputLength)
 

Detailed Description

This module includes the platform abstraction for random number generation.

Function Documentation

uint32_t otPlatRandomGet ( void  )

Get a 32-bit random value.

This function may be implemented using a pseudo-random number generator.

Returns
A 32-bit random value.
otError otPlatRandomGetTrue ( uint8_t *  aOutput,
uint16_t  aOutputLength 
)

Get true random value sequence.

This function MUST be implemented using a true random number generator (TRNG).

Parameters
[out]aOutputA pointer to where the true random values are placed. Must not be NULL.
[in]aOutputLengthSize of aBuffer.
Return values
OT_ERROR_NONESuccessfully filled aBuffer with true random values.
OT_ERROR_FAILEDFailed to fill aBuffer with true random values.
OT_ERROR_INVALID_ARGSaBuffer was set to NULL.

Documentation feedback | Developer Zone | Subscribe | Updated