在nodejs的bcrypt实现中,“B4c0 / \ /”是什么?
这可能是完全错误的,但是我想知道下面代码示例中"B4c0/\/"
的含义。 谢谢。
来自github:
To hash a password: var bcrypt = require('bcrypt'); bcrypt.genSalt(10, function(err, salt) { bcrypt.hash("B4c0/\/", salt, function(err, hash) { // Store hash in your password DB. }); }); To check a password: // Load hash from your password DB. bcrypt.compare("B4c0/\/", hash, function(err, res) { // res == true }); bcrypt.compare("not_bacon", hash, function(err, res) { // res = false });
这是一个密码被哈希。 只是一个例子。