Deterministic random bit generator.
More...
Deterministic random bit generator.
◆ SYS_DRBG_ERROR
sys drbg errors
| Enumerator |
|---|
| SYS_DRBG_ERROR_NONE | no error
|
| SYS_DRBG_ERROR_BUFFER_EXHAUSTED | buffer with random numbers has been exhausted
|
◆ sys_drbg_init()
| void sys_drbg_init |
( |
void |
| ) |
|
Initializes the DRBG data structure.
- See also
- sys_drbg_t
◆ sys_drbg_read_index()
| uint32_t sys_drbg_read_index |
( |
void |
| ) |
|
Reads the current index value of the buffer.
- Returns
- The current index value of the buffer
◆ sys_drbg_read_rand()
Reads a random number from the buffer which holds the random numbers.
- Note
- When a random number is read from the buffer it is assumed to be consumed. The next time the sys_drbg_read_rand() will be called a new random number will be read from the buffer.
- Parameters
-
| [out] | rand_number | The random number to be returned |
- Returns
- Error code. If 0 the random number was successfully read, otherwise not.
◆ sys_drbg_read_request()
| uint8_t sys_drbg_read_request |
( |
void |
| ) |
|
Reads the request value.
- Returns
- Either 0 or 1. If the request value is 1, there is a pending request for buffer update.
◆ sys_drbg_read_threshold()
| uint32_t sys_drbg_read_threshold |
( |
void |
| ) |
|
Reads the threshold level value.
- Note
- If the buffer's current index is equal to the threshold level value or greater than the threshold level value, then a request for buffer update will be issued.
- Returns
- The threshold level value
◆ sys_drbg_update()
| void sys_drbg_update |
( |
void |
| ) |
|
Updates the DRBG data structure.
- See also
- sys_drbg_t