mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 00:02:37 +10:00
11 lines
268 B
TypeScript
11 lines
268 B
TypeScript
import bcrypt from 'bcryptjs';
|
|
|
|
const rounds = 10;
|
|
|
|
export async function createHash(password: string) {
|
|
return bcrypt.hashSync(password, rounds);
|
|
}
|
|
|
|
export async function checkHash(password: string, hash: string) {
|
|
return bcrypt.compareSync(password, hash);
|
|
} |