Created
October 7, 2019 18:27
-
-
Save deepal/b5614873438e37204db2e6fa2cfb6a47 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