Tor
0.4.7.0-alpha-dev
|
Data Structures | |
struct | cbuf_t |
Data Fields | |
int16_t | n_till_reseed |
uint16_t | bytes_left |
struct crypto_fast_rng_t::cbuf_t | buf |
A fast PRNG, for use when the PRNG provided by our crypto library isn't fast enough. This one should be cryptographically strong, but has seen less auditing than the PRNGs in OpenSSL and NSS. Use with caution.
Note that this object is NOT thread-safe. If you need a thread-safe prng, use crypto_rand(), or wrap this in a mutex.
Definition at line 95 of file crypto_rand_fast.c.
uint16_t bytes_left |
How many bytes are remaining in cbuf_t.bytes?
Definition at line 105 of file crypto_rand_fast.c.
Referenced by crypto_fast_rng_getbytes_impl().
int16_t n_till_reseed |
How many more fills does this buffer have before we should mix in the output of crypto_strongest_rand()?
This value may be negative if unit tests are enabled. If so, it indicates that we should never mix in extra data from crypto_strongest_rand().
Definition at line 103 of file crypto_rand_fast.c.
Referenced by crypto_fast_rng_refill().