package mirage-crypto-rng-async

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

RNG seeding on Async.

This module initializes a Fortuna RNG with getrandom(), and CPU RNG.

val initialize : ?g:'a -> ?time_source:Async.Synchronous_time_source.t -> ?sleep:Core.Time_ns.Span.t -> 'a Mirage_crypto_rng.generator -> unit

initialize ~sleep generator will bring the RNG into a working state. The argument sleep is measured in ns (default 1s), and used to sleep between collection of entropy from the CPU RNG, every 10 * sleep getrandom is used to collect entropy.