use node.bcrypt.js
npm install --save bcryptvar bcrypt = require('bcrypt');var beforeHash = 'Hello World';
bcrypt.genSalt(10, function(err, salt) {
bcrypt.hash(beforeHash, salt, function(err, hashed) {
// Store hash in your password DB.
});
});can't decrypt
var beforeHash = 'Hello World';
bcrypt.compare(beforeHash, hashed, function(err, res) {
// res : true or false
});