randpool.c File Reference
API function for to manage entropy pool. More...
#include "randpool.h"#include "md2.h"#include <cfg/compiler.h>#include <cfg/debug.h>#include <cfg/macros.h>#include <stdio.h>#include <string.h>Go to the source code of this file.
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
API function for to manage entropy pool.
Definition in file randpool.c.
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 120 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 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/bertos_logo.png)