mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 10:19:51 -06:00
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com> Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
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;
|
|
};
|