Skip to content

Instantly share code, notes, and snippets.

@krazylearner
Created March 25, 2016 21:18
Show Gist options
  • Select an option

  • Save krazylearner/adbc3bb8a2e7e7c37fcc to your computer and use it in GitHub Desktop.

Select an option

Save krazylearner/adbc3bb8a2e7e7c37fcc to your computer and use it in GitHub Desktop.
random token generator in nodejs synchronously
// generates 4 bytes token
var outname = require('crypto').randomBytes(4).toString('hex');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment