import bcrypt from "bcryptjs"; const SALT_ROUNDS = 10; export async function hashPassword(password: string): Promise { // hashes and salts password return bcrypt.hash(password, SALT_ROUNDS) } export async function verifyPassword( // compares password to hash password: string, hash: string ): Promise { return bcrypt.compare(password, hash); }