Pike v8.1 release 6

Class Random.Deterministic

Inheritance graph
Builtin.RandomInterface Nettle.Fortuna Random.Deterministic
Description

This class implements a detministic random generator by combining a Fortuna random generator with the Random.Interface. The generator is not reseeded after the initial seed.

In case of a process fork the random generators in both processes will continue to generate identical results.


Inherit Fortuna

inherit Nettle.Fortuna : Fortuna


Inherit RandomInterface

inherit Builtin.RandomInterface : RandomInterface


Method create

Random.Deterministic Random.Deterministic(string(8bit)|int seed)

Description

Initialize the random generator with seed. The internal state is 256 bits, but all seed sizes are allowed.