templates2.Landing.Nuxt/shared/password.ts
w4c-templates b41099ee06
Some checks failed
CI / quality (push) Has been cancelled
chore(template): publish Landing.Nuxt
2026-10-11 23:24:06 +03:00

11 lines
322 B
TypeScript

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