Spaces:
Runtime error

File size: 256 Bytes
ad79323
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import bcrypt from "bcryptjs";

export async function hashPassword(password: string) {
  return bcrypt.hash(password, 12);
}

export async function verifyPassword(password: string, passwordHash: string) {
  return bcrypt.compare(password, passwordHash);
}