randpool.h File Reference
Collection of functions to manage entropy pool. More...
#include "cfg/cfg_randpool.h"#include <cfg/compiler.h>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. | |
Detailed Description
Collection of functions to manage entropy pool.
- Version:
- Id
- randpool.h 2942 2009-09-15 11:03:05Z asterix
Definition in file randpool.h.
Function Documentation
| void randpool_add | ( | EntropyPool * | pool, | |
| void * | data, | |||
| size_t | entropy | |||
| ) |
Add.
- Parameters:
-
entropy bits from data buffer to the entropy pool
Definition at line 121 of file randpool.c.
| void randpool_get | ( | EntropyPool * | pool, | |
| void * | _data, | |||
| size_t | n_byte | |||
| ) |
Get.
- Parameters:
-
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 206 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 162 of file randpool.c.
