Skip to content

Instantly share code, notes, and snippets.

@FrankHassanabad
Created March 18, 2018 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FrankHassanabad/1a7210292b4c9b7012f8764961386a65 to your computer and use it in GitHub Desktop.
Save FrankHassanabad/1a7210292b4c9b7012f8764961386a65 to your computer and use it in GitHub Desktop.
MDN Crypto Example
/* assuming that window.crypto.getRandomValues is available */
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]);
}
@FrankHassanabad
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment