Posted 15 April 2013 - 03:55 AM
Hello all.
This API implements the ISAAC CSPRNG (cryptographically-secure pseudo-random number generator) in Lua. In addition, it also implements the Mersenne Twister PRNG.
Functions:
This API implements the ISAAC CSPRNG (cryptographically-secure pseudo-random number generator) in Lua. In addition, it also implements the Mersenne Twister PRNG.
Functions:
- initialize_mt_generator(seed) - Seed the Mersenne Twister.
- extract_mt(min, max) - Get a number from the Mersenne Twister (min and max default to 0 and 2^32-1.)
- seed_from_mt(seed) - Seed the ISAAC algorithm, optionally seeding the Mersenne Twister beforehand.
- generate_isaac(entropy) - Generate a new batch of numbers from the ISAAC algorithm, optionally seeding it with numbers from a provided table with seed values. If you are seeding with your own entropy, remember that you need at least 256 values, and that each value must be less than 2^32-1.
- random(min, max) - Get a number from the ISAAC algorithm. (again, min and max default to 0 and 2^32-1)