> > ---------- Forwarded message ---------- > From: "MichaĆ Wadas" <[email protected]> > To: [email protected] > Cc: > Date: Tue, 1 Dec 2015 20:20:34 +0100 > Subject: PRNG - currently available solutions aren't addressing many use > cases >
... > - not seedable > Chance JS is a fairly prominent high-level JavaScript library for this purpose, has a configurable seed, implements a Mersenne Twister, does not use Math.random(), but is likely in the PRNG class, not in the CSPRNG class: http://chancejs.com/#seed That said, it would be interesting if some of the ES2015 primitives had built-in random generators: synchronous for PRNG, and asynchronous for CSPRNG. e.g. Boolean.random() => Boolean Boolean.randomCS(callback?) => Promise Number.randomInt(min, max) => Number Number.randomIntCS(min, max, callback?) => Promise etc... But these can be and are implemented just fine at the user-land level. As such, it's hard to justify making the standard library larger for this purpose. For CSPRNG purposes, however, it could be valuable to standardise either Node.js crypto module, the window.crypto, or something new (that supports seeds)?
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

