committing summative

This commit is contained in:
Archie committed 2026-11-06 10:02:29 +00:00
1 parent 73ac8e85be
commit 95b138f29e
44 files changed
+5319 -755

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import bcrypt from "bcryptjs";
const SALT_ROUNDS = 10;
export async function hashPassword(password: string): Promise<string> { // hashes and salts password
return bcrypt.hash(password, SALT_ROUNDS)
}
export async function verifyPassword( // compares password to hash
password: string,
hash: string
): Promise<boolean> {
return bcrypt.compare(password, hash);
}