Inital Commit

This commit is contained in:
2026-03-22 19:26:35 +01:00
commit 705329d3c2
17 changed files with 5538 additions and 0 deletions

12
server/password.js Normal file
View File

@@ -0,0 +1,12 @@
import bcrypt from 'bcrypt';
const ROUNDS = 10;
export async function hashPassword(plain) {
return bcrypt.hash(plain, ROUNDS);
}
export async function verifyPassword(plain, hash) {
if (!hash || typeof hash !== 'string') return false;
return bcrypt.compare(plain, hash);
}