Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.