Random protocol - Factor Documentation (original) (raw)

Random protocol
Generating random integers

Prev: with-secure-random ( quot -- )
Next: randomize ( seq -- randomized )

A random number generator must implement one of these two words:
random-32* ( rnd -- n )
random-bytes* ( n rnd -- byte-array )

Optional, to seed a random number generator:

seed-random ( rnd seed -- rnd )