11 lines
241 B
TypeScript
11 lines
241 B
TypeScript
import bcrypt from "bcryptjs";
|
|
|
|
export async function hashPassword(password: string) {
|
|
return bcrypt.hash(password, 10);
|
|
}
|
|
|
|
export async function verifyPassword(password: string, hash: string) {
|
|
return bcrypt.compare(password, hash);
|
|
}
|
|
|