I need to generate cryptographically secure pseudorandom numbers, in Javascript. I know about the window.crypto.getRandomValues
API, which does exactly what I want. However, I also know it was introduced relatively recently (in 2011 or so).
Can I safely assume window.crypto.getRandomValues
is present, or will using it introduce compatibility problems on some browsers? Are there any major (widely used) browsers which do not support window.crypto.getRandomValues
(including mobile or desktop browsers), and if so, which ones do I need to worry about? I would be delighted to learn that there is enough support that I no longer need to worry about fallback methods, if that is indeed the case.