password.js 199 B

123456789
  1. var bcrypt = require('bcryptjs');
  2. var hash = bcrypt.hashSync('robert', 10);
  3. console.log(hash);
  4. bcrypt.compare('robert2', hash, function (fail, ok) {
  5. console.log(fail);
  6. console.log(ok);
  7. });