Skip to content

Instantly share code, notes, and snippets.

@sprice
Created June 18, 2012 22:58
Show Gist options
  • Save sprice/2951303 to your computer and use it in GitHub Desktop.
Save sprice/2951303 to your computer and use it in GitHub Desktop.
Create a random string. (node.js)
var crypto = require('crypto');
crypto.randomBytes(64, function(ex, buf) {
if (ex) throw ex;
console.log(buf.toString('hex'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment