The Crypto.getRandomValues() method lets you generate strong random values. 

It's not using a truly random number generator, but a pseudo-random number generator.

getRandomValues() is the only member of the Crypto.

As per MDN notes, "Don't use getRandomValues() to generate encryption keys. Instead, use the generateKey() method. There are a few reasons for this; for example, getRandomValues() is not guaranteed to be running in a secure context."

0 Comments

Leave a reply

Your email address will not be published. required fields are marked *