This commit is contained in:
newtbot
2024-01-24 14:37:57 +08:00
parent e710fa15a1
commit d0aeab286a
5 changed files with 5 additions and 36 deletions

View File

@ -2,26 +2,6 @@ const bcrypt = require('bcrypt');
const saltRounds = 10;
//https://github.com/kelektiv/node.bcrypt.js#readme
/*
// Load hash from your password DB.
bcrypt.compare(myPlaintextPassword, hash, function(err, result) {
// result == true
});
bcrypt.compare(someOtherPlaintextPassword, hash, function(err, result) {
// result == false
});
*/
/*
//hash with salt
bcrypt.hash(myPlaintextPassword, saltRounds, function(err, hash) {
// Store hash in your password DB.
});
*/
//hash for pass or token lol doesnt matter
async function hash(password) {
return await bcrypt.hash(password, saltRounds);