This module includes the platform abstraction to support critical sections.
More...
This module includes the platform abstraction to support critical sections.
uint32_t otPlatRandomGet |
( |
void |
| ) |
|
Get a 32-bit random value.
- Returns
- A 32-bit random value.
ThreadError otPlatRandomSecureGet |
( |
uint16_t |
aInputLength, |
|
|
uint8_t * |
aOutput, |
|
|
uint16_t * |
aOutputLength |
|
) |
| |
Get true random stream.
- Parameters
-
[in] | aInputLength | The expected size of random values. |
[out] | aOutput | A pointer to the buffer for the generated random stream. The pointer should never be NULL. |
[out] | aOutputLength | A pointer to the generated size of random stream. It is supposed to be the same as aInputLength, but maybe less than aInputLength. The pointer should never be NULL. |
- Return values
-
kThreadError_None | Generate random successfully. |
kThreadError_Fail | Generate random fail. |
kThreadError_InvalidArgs | Invalid args. |