10 lines
215 B
JavaScript
10 lines
215 B
JavaScript
|
|
import bcrypt from "bcryptjs";
|
||
|
|
|
||
|
|
export async function hashPassword(password) {
|
||
|
|
return bcrypt.hash(password, 10);
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function comparePassword(password, hash) {
|
||
|
|
return bcrypt.compare(password, hash);
|
||
|
|
}
|