I am trying to use the window.crypto.getRandomValues method in a nodejs script. From my understanding there is no window element when I run a simple co
window.crypto.getRandomValues
window
You can use this module which is the same as the window element: get-random-values
Install it:
npm install get-random-values --save
Use it:
var getRandomValues = require('get-random-values'); var array = new Uint32Array(10); getRandomValues(array);