This question may be a little off-topic, but is Math.random the same as crypto.getRandomValues? (JavaScript)
Here's an example:
Math.random(); // 0.11918419514323941
self.crypto.getRandomValues(new Uint32Array(10))[0]; // 2798055700
(Using "self" for cross-site prevention)
They don't output the same number or nearly the same length, but I'm wondering if "crypto.getRandomValues" is more secure then "Math.random"?
A user told me (on this site) that I should use "crypto.getRandomValues" instead of "Math.random" for JavaScript security. All of this is for a JavaScript security project.