-
-
Save kvandake/a1e412ed050c7185970129252a380499 to your computer and use it in GitHub Desktop.
Generate secret key in NodeJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
node -e "require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); });"