package mirage-crypto-rng

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

Module Mirage_crypto_rng_unixSource

RNG seeding on Unix.

This module initializes a Fortuna RNG with getrandom(), and CPU RNG. On BSD systems (FreeBSD, OpenBSD, macOS) getentropy () is used instead of getrandom (). On Windows 10 or higher, BCryptGenRandom() is used with the default RNG. Windows 8 or lower are not supported by this library.

Sourceval initialize : ?g:'a -> 'a Mirage_crypto_rng.generator -> unit

initialize ~g rng will bring the RNG into a working state.

Sourceval getrandom : int -> Cstruct.t

getrandom size returns a buffer of size filled with random bytes.

OCaml

Innovation. Community. Security.