Files
Reactive-Resume/src/utils/password.ts
T
2026-01-19 23:31:54 +01:00

9 lines
289 B
TypeScript

import { compare, hash } from "bcrypt";
const SALT_ROUNDS = 10;
export const hashPassword = (password: string): Promise<string> => hash(password, SALT_ROUNDS);
export const verifyPassword = (password: string, passwordHash: string): Promise<boolean> =>
compare(password, passwordHash);