prng.h File Reference
Generic interface for cryptographically-secure pseudo-RNG. More...
Go to the source code of this file.
Functions | |
| void | prng_reseed (PRNG *ctx, const uint8_t *seed) |
| Feed a new seed into the PRNG. | |
| size_t | prng_seed_len (PRNG *ctx) |
| Get the length of the seed in bytes required by this generator. | |
| void | prng_generate (PRNG *ctx, uint8_t *data, size_t len) |
| Generate some cryptographically-secure random bytes into the specified buffer. | |
Detailed Description
Generic interface for cryptographically-secure pseudo-RNG.
Definition in file prng.h.
Function Documentation
| void prng_reseed | ( | PRNG * | ctx, |
| const uint8_t * | seed | ||
| ) | [inline] |
Feed a new seed into the PRNG.
- Note:
- : Being a cryptographically-secure PRNG, the seed will be mixed to the current state of the generator, so it is NOT possible to generate the same sequence simply by using the same seed. If you need such a property, use a normale PRGN like rand().
![(please configure the [header_logo] section in trac.ini)](/chrome/site/bertos_logo.png)