-
-
Save dpjayasekara/e5ae361557c931589d48eed8f2de2bf2 to your computer and use it in GitHub Desktop.
Encrypt with bcrypt
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
const bcrypt = require('bcrypt'); | |
module.exports = (plainText) => { | |
const salt = bcrypt.genSaltSync(12); | |
return bcrypt.hashSync(plainText, salt); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment