Created
November 16, 2016 19:17
-
-
Save brickpop/563c615a9c52a7b98e1dc4ddf468cbce to your computer and use it in GitHub Desktop.
Password digest for 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
var crypto = require('crypto'); | |
function digestPwd(password){ | |
var shasum = crypto.createHash('sha1'); | |
shasum.update(password); | |
return shasum.digest('hex'); | |
} | |
module.exports = digestPwd; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment