mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-05 18:44:49 +10:00
9 lines
289 B
TypeScript
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);
|