import * as bcrypt from "bcrypt"; export async function hashPassword(password: string): Promise { const saltRounds = 10; const salt = await bcrypt.genSalt(saltRounds); const hashedPassword = await bcrypt.hash(password, salt); return hashedPassword; } export async function checkPassword( password: string, hash: string ): Promise { const match = await bcrypt.compare(password, hash); return match; }