mirror of
https://github.com/IliesAllali/parenthese.git
synced 2026-11-14 16:30:50 +00:00
Galaxie familiale : personnes, unions et filiations, photos, vidéos et voix sur chaque personne, partage par lien avec consultation sans compte et contributions validées par le propriétaire. Auto-hébergeable avec Docker. Licence PolyForm Noncommercial 1.0.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
11 lines
292 B
TypeScript
11 lines
292 B
TypeScript
import bcrypt from 'bcryptjs'
|
|
|
|
const HASH_ROUNDS = 12
|
|
|
|
export async function hashPassword(value: string): Promise<string> {
|
|
return bcrypt.hash(value, HASH_ROUNDS)
|
|
}
|
|
|
|
export async function verifyPassword(value: string, hash: string): Promise<boolean> {
|
|
return bcrypt.compare(value, hash)
|
|
} |