package mirage-crypto-rng

  1. Overview
  2. Docs
A cryptographically secure PRNG

Install

Dune Dependency

Authors

Maintainers

Sources

mirage-crypto-1.1.0.tbz
sha256=c7189767a7ead54923cab020f39cd0c34af7d4b048776939d94f028abf536353
sha512=312f0ea8433bb35224f4ae6e00ff2d5e6ca72f8e5b6d9e24cf609f004629ac55708fe6987edcc6bdd58e67f0044e053d08ccd783abc7f791fe27e77f6eb1ec62

doc/mirage-crypto-rng.unix/Mirage_crypto_rng_unix/index.html

Module Mirage_crypto_rng_unix

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.

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

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

val getrandom : int -> string

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

OCaml

Innovation. Community. Security.