Mirage_crypto_rng.FortunaFortuna, a CSPRNG proposed by Schneier.
Internally, this generator's generate always produces k * block bytes.
val generate_into : g:g -> bytes -> off:int -> int -> unitgenerate_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.
val reseed : g:g -> string -> unitreseed ~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.
val accumulate : g:g -> Entropy.source -> [ `Acc of string -> unit ]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.
val seeded : g:g -> boolseeded ~g is true iff operations won't throw Unseeded_generator.