Page
Library
Module
Module type
Parameter
Class
Class type
Source
Mirage_crypto_rng_mirage.MakeSourcemodule T : Mirage_time.Smodule M : Mirage_clock.MCLOCKinclude Stype g = Mirage_crypto_rng.gA generator (PRNG) with its state.
val generate_into : ?g:g -> bytes -> ?off:int -> int -> unitgenerate_into ~g buf ~off len invokes generate_into on g or default generator. The random data is put into buf starting at off (defaults to 0) with len bytes.
val generate : ?g:g -> int -> stringInvoke generate_into on g or default generator and a freshly allocated string.
val accumulate : g option -> Entropy.source -> [ `Acc of string -> unit ]accumulate g source is a function data -> unit to feed entropy to the RNG. This is useful if your system has a special entropy source.
initialize ~g ~sleep generator sets the default generator to the generator and sets up periodic entropy feeding for that rng. This function fails (Lwt.fail) if it is called a second time. The argument ~sleep is measured in ns, and used as sleep between cpu assisted random number collection. It defaults to one second.