mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-04 12:50:58 -06:00
12 lines
345 B
TypeScript
12 lines
345 B
TypeScript
import { compare, hash } from "bcryptjs";
|
|
|
|
export const hashPassword = async (password: string) => {
|
|
const hashedPassword = await hash(password, 12);
|
|
return hashedPassword;
|
|
};
|
|
|
|
export const verifyPassword = async (password: string, hashedPassword: string) => {
|
|
const isValid = await compare(password, hashedPassword);
|
|
return isValid;
|
|
};
|