Library
Module
Module type
Parameter
Class
Class type
Create cryptographically secure random data.
type bigarray =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
A bigarray.
val cstruct : int -> Cstruct.t
cstruct n
will create a Cstruct.t
of up to n
bytes
int8 ()
creates a random byte.
If you need the byte to be encoded as a char
, consider using char ()
instead.
int ~max ()
creates a random 31-bit integer between 0 and max
if max
is specified.
float ~max ()
creates a random float between 0.0 and max
if max
is specified.
val bigarray : int -> bigarray
bigarray len
creates len
random bytes in a bigarray
val seq : (unit -> 'a) -> 'a Seq.t
seq gen
creates an infinite sequence of values created by gen
.
For example, use seq int
to create an infinite sequence of random integers.