import bcrypt from "bcrypt"; /** * Compares a plain text password with a hashed password. * * @param password - The plain text password to compare. * @param hash - The hashed password to compare against. * @returns True if the passwords match, false otherwise. */ async function comparePassword( password: string, hash: string ): Promise { return bcrypt.compare(password, hash); } export default comparePassword;