Click here to Skip to main content
15,889,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
var array = new Uint32Array(10);
window.crypto.getRandomValues(array);

console.log("Your lucky numbers:");
for (var i = 0; i < array.length; i++) {
console.log(array[i]);
}

Above javascript code is not working in IE.11 version.

Can somebody help me please.

Thank you

What I have tried:

Tried to generate the cryptographic random numbers using javascript code,
but showing undefined getRandomValues() function.
Posted
Updated 8-May-16 21:28pm
Comments
Mohibur Rashid 9-May-16 3:22am    
Which means your getRandomValues function is not defined. what is the library for that?

1 solution

try
JavaScript
window.msCrypto.getRandomValues(array)
 
Share this answer
 
Comments
CPallini 9-May-16 3:42am    
5.
Karthik_Mahalingam 9-May-16 3:49am    
Thanks CPallini :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900