From Dev.to
Why crypto.getRandomValues() is not Math.random(), and the password code that gets it right
Math.random() is a PRNG. It is fine for particle positions and test data; it is not fine for passwords, session ids, reset tokens, or anything an attacker can guess or replay. V8's implementation is f...
