import bcrypt from 'bcryptjs'; /** Pure password helpers (shared by server routes and unit tests). */ export function hashPassword(plain: string): Promise { return bcrypt.hash(plain, 10); } export function verifyPassword(plain: string, hash: string): Promise { return bcrypt.compare(plain, hash); }