Skip to content

Instantly share code, notes, and snippets.

@etale
Created March 31, 2016 07:43
Show Gist options
  • Save etale/f167128b1f29ecd00d0e98fde76150e2 to your computer and use it in GitHub Desktop.
Save etale/f167128b1f29ecd00d0e98fde76150e2 to your computer and use it in GitHub Desktop.
generate 32 bytes id
var id = () => Array.from(crypto.getRandomValues(new Uint8Array(32))).map(a => (a + 0x100).toString(0x10).slice(1)).join('')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment