CoolFace
Apppublic

sifars/automated-invoice-processing-agent-backend

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
passwordUtils.ts12 linesDownload Raw Back to utils
1import bcrypt from 'bcryptjs';2 3export const hashPassword = async (password: string) => {4    const salt = await bcrypt.genSalt(10);5    const hashedPassword = await bcrypt.hash(password, salt);6    return hashedPassword;7}8 9export const comparePassword = async (password: string, hashedPassword: string) => {10    return await bcrypt.compare(password, hashedPassword);11}12