🍏
Size: a a a
🍏
ST
const bcrypt = require('bcrypt');
const src = 'hello world';
console.log(`src = ${src}`);
const res1 = bcrypt.hashSync(src, 10);
const res2 = bcrypt.hashSync(src, 10);
console.log(`hash 1 = ${res1},\nhash 2 = ${res2}`);
console.log(`compare 1 = ${bcrypt.compareSync(src, res1)}`);
console.log(`compare 2 = ${bcrypt.compareSync(src, res2)}`);
src = hello world
hash 1 = $2b$10$1xERx07vY1HAIa600CWcZecuioeIfLW1y99XlOMvJh2tuGqIQ5eai,
hash 2 = $2b$10$D0U3B7OUAfetndiEdZd6Ked8UZuQl0EC6Evpo5bVbalfJzH1ADDMW
compare 1 = true
compare 2 = true
ST
SK
🍏
7
const bcrypt = require('bcrypt');
const src = 'hello world';
console.log(`src = ${src}`);
const res1 = bcrypt.hashSync(src, 10);
const res2 = bcrypt.hashSync(src, 10);
console.log(`hash 1 = ${res1},\nhash 2 = ${res2}`);
console.log(`compare 1 = ${bcrypt.compareSync(src, res1)}`);
console.log(`compare 2 = ${bcrypt.compareSync(src, res2)}`);
src = hello world
hash 1 = $2b$10$1xERx07vY1HAIa600CWcZecuioeIfLW1y99XlOMvJh2tuGqIQ5eai,
hash 2 = $2b$10$D0U3B7OUAfetndiEdZd6Ked8UZuQl0EC6Evpo5bVbalfJzH1ADDMW
compare 1 = true
compare 2 = true
🍏
🍏
7
🍏
bcrypt.hashSync(myPlaintextPassword, salt);
7
7
🍏
7
🍏
7
ST
console.log(bcrypt.genSaltSync(10));Выдает:
console.log(bcrypt.genSaltSync(10));
console.log(bcrypt.genSaltSync(10));
$2b$10$Pfl1AApWu3OaXmWj1cEz1u
$2b$10$cKrK9uVZD24RZu4fBjH/1O
$2b$10$LpyUimXE977ZYzj.y16Gwu
🍏
console.log(bcrypt.genSaltSync(10));Выдает:
console.log(bcrypt.genSaltSync(10));
console.log(bcrypt.genSaltSync(10));
$2b$10$Pfl1AApWu3OaXmWj1cEz1u
$2b$10$cKrK9uVZD24RZu4fBjH/1O
$2b$10$LpyUimXE977ZYzj.y16Gwu
7
console.log(bcrypt.genSaltSync(10));Выдает:
console.log(bcrypt.genSaltSync(10));
console.log(bcrypt.genSaltSync(10));
$2b$10$Pfl1AApWu3OaXmWj1cEz1u
$2b$10$cKrK9uVZD24RZu4fBjH/1O
$2b$10$LpyUimXE977ZYzj.y16Gwu