Library
Module
Module type
Parameter
Class
Class type
Create cryptographically secure random data.
type bigarray =
(char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
A bigarray.
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
seq gen
creates an infinite sequence of values created by gen
.
For example, use seq int
to create an infinite sequence of random integers.