package mirage-crypto-rng
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=840fbf4136605b4a1f1dd5c0611932a274fe3bf97464c82a6b3a9731a68e208e
sha512=8b983bf9e7fc03f3442b9e00f8ec562d6f0ae18702d10a9ca79182e135f85d1c264393d4033c78e51b945dbe4eb7f436a25ccfedeb0c1f9cdb4c46927cd94fbf
doc/mirage-crypto-rng.unix/Mirage_crypto_rng_unix/Getentropy/index.html
Module Mirage_crypto_rng_unix.GetentropySource
A generator using getrandom(3) on Linux, getentropy(3) on BSD and macOS, and BCryptGenRandom() on Windows.
State type for this generator.
Internally, this generator's generate always produces k * block bytes.
generate_into ~g buf ~off n produces n uniformly distributed random bytes into buf at offset off, updating the state of g.
Assumes that buf is at least off + n bytes long. Also assumes that off and n are positive integers. Caution: do not use in your application, use Mirage_crypto_rng.generate_into instead.
reseed ~g bytes directly updates g. Its new state depends both on bytes and the previous state.
A generator is seded after a single application of reseed.
accumulate ~g is a closure suitable for incrementally feeding small amounts of environmentally sourced entropy into g.
Its operation should be fast enough for repeated calling from e.g. event loops. Systems with several distinct, stable entropy sources should use stable source to distinguish their sources.
pools is the amount of pools if any.