Skip to content

Instantly share code, notes, and snippets.

@vasiliy0s
Forked from dehamzah/generate.js
Created September 6, 2017 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vasiliy0s/2391507d3e7e4885da5ce28f4c11a664 to your computer and use it in GitHub Desktop.
Save vasiliy0s/2391507d3e7e4885da5ce28f4c11a664 to your computer and use it in GitHub Desktop.
Generate secret key in NodeJS
require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment