templates2.Store.Nuxt/shared/password.ts
w4c-templates 228f2f01f2
Some checks failed
CI / quality (push) Has been cancelled
chore(template): publish Store.Nuxt
2026-10-11 23:24:30 +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);
}