Commit Graph

2 Commits (fce09a935bbf657def7096dc558a7856d19927b9)

Author SHA1 Message Date
Kevin Bracey fce09a935b Add local pseudo-RNG to randLIB
Rather than using system rand(), provide our own pseudo-RNG.

Generator used is "xoroshiro128+", which has 16 bytes of state and
2^128-1 period.

Main advantage is that we can now seed with up to 128 bits of entropy,
rather than the 32 bits srand() limited us to. We also can be assured of
the quality of the algorithm.

As the core generator is 64-bit, we now provide a get 64-bit function,
and others are based on this.

Incorporate Linux's /dev/urandom use into the main source file.
2016-10-18 09:23:32 +01:00
Antti Kauppila 77d8232f90 randlib unit tested 2016-05-20 16:28:35 +03:00