Skip to content

Instantly share code, notes, and snippets.

@recidive
Created January 25, 2014 05:22
Show Gist options
  • Select an option

  • Save recidive/8612205 to your computer and use it in GitHub Desktop.

Select an option

Save recidive/8612205 to your computer and use it in GitHub Desktop.
Random string in nodejs.
var string = require('crypto').randomBytes(32).toString('base64').replace(/[^a-z0-9]/gi, '').substr(0, 32);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment