Files
Homarr/packages/auth/security.ts
2024-05-18 12:25:33 +02:00

10 lines
226 B
TypeScript

import bcrypt from "bcrypt";
export const createSaltAsync = async () => {
return bcrypt.genSalt(10);
};
export const hashPasswordAsync = async (password: string, salt: string) => {
return bcrypt.hash(password, salt);
};