Open olalonde opened 5 years ago
Just a heads up: your randomNumber function is biased (so probably not suitable for cryptographic purpose). See http://www.pcg-random.org/posts/bounded-rands.html for details (specifically "FP Multiply (Biased)" section).
I opened a Node.js feature request to get this into the standard library since it's such a common error: https://github.com/nodejs/node/issues/29707
Thanks for the heads up. Any idea how we could fix it in the meantime?
Just a heads up: your randomNumber function is biased (so probably not suitable for cryptographic purpose). See http://www.pcg-random.org/posts/bounded-rands.html for details (specifically "FP Multiply (Biased)" section).
I opened a Node.js feature request to get this into the standard library since it's such a common error: https://github.com/nodejs/node/issues/29707