package mirage-types

  1. Overview
  2. Docs

Operations to generate entropy. This is currently a passthrough to the OCaml Random generator, and will be deprecated in V2 and turned into a proper DEVICE with blocking modes.

val self_init : unit -> unit

Initialize the generator with a random seed chosen in a system-dependent way.

val int : int -> int

int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0 and less than 230.

val int32 : int32 -> int32

int32 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

OCaml

Innovation. Community. Security.