BeRTOS
|
Collection of functions to manage entropy pool. More...
Go to the source code of this file.
Data Structures | |
struct | EntropyPool |
Sturct data of entropy pool. More... | |
Functions | |
void | randpool_add (EntropyPool *pool, void *data, size_t entropy) |
Add. | |
void | randpool_init (EntropyPool *pool, void *_data, size_t len) |
Randpool function initialization. | |
size_t | randpool_size (EntropyPool *pool) |
Get the actual value of entropy. | |
void | randpool_get (EntropyPool *pool, void *data, size_t n_byte) |
Get. | |
uint8_t * | randpool_pool (EntropyPool *pool) |
Return a pointer to entropy pool. |
Collection of functions to manage entropy pool.
Definition in file randpool.h.
void randpool_add | ( | EntropyPool * | pool, |
void * | data, | ||
size_t | entropy | ||
) |
Add.
entropy | bits from |
data | buffer to the entropy |
pool |
Definition at line 120 of file randpool.c.
void randpool_get | ( | EntropyPool * | pool, |
void * | _data, | ||
size_t | n_byte | ||
) |
Get.
n_byte | from entropy pool. If n_byte is larger than number byte of entropy in entropy pool, randpool_get continue to generate pseudocasual value from previous state of pool. |
n_byte | number fo bytes to read. |
pool | is the pool entropy context. |
_data | is the pointer to write the random data to. |
Definition at line 205 of file randpool.c.
void randpool_init | ( | EntropyPool * | pool, |
void * | _data, | ||
size_t | len | ||
) |
Randpool function initialization.
The entropy pool can be initialize also with a previous entropy pool.
Definition at line 161 of file randpool.c.