175
rated 0 times
[
178]
[
3]
/ answers: 1 / hits: 24974
/ 10 Years ago, mon, september 8, 2014, 12:00:00
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 code like this in node:
var array = new Uint32Array(10);
window.crypto.getRandomValues(array);
Which is why I get this error:
ReferenceError: window is not defined
How can I use this method in my code?
Thanks
More From » node.js