242b 2410 bcrypt

Solutions on MaxInterview for 242b 2410 bcrypt by the best coders in the world

showing results for - " 242b 2410 bcrypt"
Lohan
19 Jan 2019
1// app.js
2
3const bcrypt = require("bcrypt");
4const saltRounds = 10;
5const plainTextPassword1 = "DFGh5546*%^__90";
6
7bcrypt
8  .genSalt(saltRounds)
9  .then(salt => {
10    console.log(`Salt: ${salt}`);
11
12    return bcrypt.hash(plainTextPassword1, salt);
13  })
14  .then(hash => {
15    console.log(`Hash: ${hash}`);
16
17    // Store hash in your password DB.
18  })
19  .catch(err => console.error(err.message));
20
Niko
01 Jan 2020
1// app.js
2
3const bcrypt = require("bcrypt");
4const saltRounds = 10;
5const plainTextPassword1 = "DFGh5546*%^__90";
6
7bcrypt
8  .hash(plainTextPassword1, saltRounds)
9  .then(hash => {
10    console.log(`Hash: ${hash}`);
11
12    // Store hash in your password DB.
13  })
14  .catch(err => console.error(err.message));
15
Timothy
24 Jan 2017
1BCrypt.with(BCrypt.Version.VERSION_2Y).hashToChar(10, password.toCharArray());