Closed saghul closed 8 years ago
A non-cryptographically safe random helper thingy.
TBD: base it on Math.random (Duktape's implementation here) or something else (Mersene Twister I guess?).
References: https://docs.python.org/3.6/library/random.html http://ruby-doc.org/stdlib-2.1.2/libdoc/securerandom/rdoc/SecureRandom.html https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues https://github.com/ckknight/random-js http://ruby-doc.org/core-2.2.0/Random.html https://github.com/MersenneTwister-Lab/TinyMT https://github.com/dajobe/libmtwist https://github.com/cslarsen/mersenne-twister https://github.com/ruby/ruby/blob/trunk/random.c
Also os.urandom, using the system CSPRNG.
os.urandom
os.urandom: https://github.com/saghul/sjs/commit/2bb7372173f1760725e445e19179197847b40c5e
A non-cryptographically safe random helper thingy.
TBD:
base it on Math.random(Duktape's implementation here)or something else(Mersene Twister I guess?).References: https://docs.python.org/3.6/library/random.html http://ruby-doc.org/stdlib-2.1.2/libdoc/securerandom/rdoc/SecureRandom.html https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues https://github.com/ckknight/random-js http://ruby-doc.org/core-2.2.0/Random.html https://github.com/MersenneTwister-Lab/TinyMT https://github.com/dajobe/libmtwist https://github.com/cslarsen/mersenne-twister https://github.com/ruby/ruby/blob/trunk/random.c