Commit Graph

3 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
Tero Heinonen 32afec7f59 licence and copyrights updated 2015-08-03 13:53:57 +03:00
Seppo Takalo bb97e63b78 Move randlib away from libservice. 2015-07-13 15:51:05 +03:00