()
| 3 | |
| 4 | // dup from utilities to avoid circular dependency |
| 5 | function generateSalt(): string { |
| 6 | return randomBytes(16).toString('hex'); |
| 7 | } |
| 8 | // dup from utilities to avoid circular dependency |
| 9 | function generateHash(password: string, salt: string): string { |
| 10 | const hash = createHmac('sha512', salt); |