import bcrypt from 'bcrypt'; export async function hashPassword(password: string): Promise { const hashedPassword = await bcrypt.hash(password, 10); return hashedPassword; } export async function comparePassword( password: string, hashedPassword: string, ): Promise { const isValid = await bcrypt.compare(password, hashedPassword); return isValid; }