switch back to json

This commit is contained in:
Huskydog9988
2025-03-23 20:29:50 -04:00
parent c1272dc7a7
commit 690aa042df
4 changed files with 34 additions and 28 deletions

View File

@ -1,10 +1,13 @@
import bcrypt from "bcryptjs";
import * as argon2 from "argon2";
import { type } from "arktype";
// const bcryptRounds = 10;
// export async function createHashBcrypt(password: string) {
// return await bcrypt.hash(password, bcryptRounds);
// }
export const simpleAuth = type({
version: "string.semver",
password: "string",
});
export type SimpleAuthType = typeof simpleAuth.infer;
export async function checkHashBcrypt(password: string, hash: string) {
return await bcrypt.compare(password, hash);