Created
May 4, 2018 15:09
-
-
Save rdev5/0a18c0b17fe6671db1070490cc7908f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns 32 bytes of cryptographically strong random sequence, Base64-encoded | |
var data = (function(size){return btoa([].slice.call((window.crypto||window.msCrypto).getRandomValues(new Uint8Array(size))).map(b => String.fromCharCode(b)).join(''))})(32); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment