(codes: string[])
| 75 | } |
| 76 | |
| 77 | export async function hashRecoveryCodes(codes: string[]): Promise<string[]> { |
| 78 | return Promise.all(codes.map((code) => hashPassword(normalizeRecoveryCode(code)))); |
| 79 | } |
| 80 | |
| 81 | export function normalizeRecoveryCode(input: string): string { |
| 82 | return input.trim().toUpperCase().replace(/\s+/g, ''); |
no test coverage detected