import { compare, hash } from 'bcrypt'; export async function hashPassword( password: string, saltRounds: number, ): Promise { const hashedPassword = await hash(password, 10); return hashedPassword; } export async function validatePassword( password: string, hashedPassword: string, ): Promise { const isPasswordValid = await compare(password, hashedPassword); return isPasswordValid; }