Add skeleton

This commit is contained in:
2025-09-17 13:28:50 +07:00
parent f4ab31b436
commit 945e0083d2
5 changed files with 147 additions and 0 deletions

12
helpers/hashPassword.js Normal file
View File

@@ -0,0 +1,12 @@
const bcrypt = require("bcrypt");
const hashPassword = async (password) => {
const salt = await bcrypt.genSalt();
const hashedPassword = await bcrypt.hash(password, salt);
return hashedPassword;
};
const comparePassword = async (password, passwordHash) =>
await bcrypt.compare(password, passwordHash);
module.exports = { hashPassword, comparePassword };