Spaces:
Runtime error
Runtime error
Download src/server/auth/password.ts from Ali-Developments/COURTRIX: direct link, hf CLI and curl.
- Browser
- Download file 256 Bytes
-
https://huggingface.co/spaces/Ali-Developments/COURTRIX/resolve/main/src/server/auth/password.ts
- Command line
-
hf download hf://spaces/Ali-Developments/COURTRIX/src/server/auth/password.ts
-
curl -L -o password.ts https://huggingface.co/spaces/Ali-Developments/COURTRIX/resolve/main/src/server/auth/password.ts
256 Bytes
| import bcrypt from "bcryptjs"; | |
| export async function hashPassword(password: string) { | |
| return bcrypt.hash(password, 12); | |
| } | |
| export async function verifyPassword(password: string, passwordHash: string) { | |
| return bcrypt.compare(password, passwordHash); | |
| } | |