mirror of
https://gitea.gofwd.group/sean/gunbuilder-next-tailwind.git
synced 2025-12-05 18:46:45 -05:00
10 lines
406 B
JavaScript
10 lines
406 B
JavaScript
const bcrypt = require('bcryptjs');
|
|
|
|
// Replace with your plaintext password and hash
|
|
const plaintextPassword = 'newpassword'; // <-- put your real password here
|
|
const hash = '$2b$10$n78/VuxwnDoOemWoqjVKnunz5PZy7SisG3VUhsPtQXKEEnMej6TWK';
|
|
|
|
bcrypt.compare(plaintextPassword, hash, (err, result) => {
|
|
if (err) throw err;
|
|
console.log('Password matches hash?', result); // true if matches, false if not
|
|
}); |