Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 3x 3x 3x 1x | import * as argon2 from 'argon2';
import { IPasswordHashService } from './interfaces/password-hash-service.interface';
export class PasswordHashService implements IPasswordHashService {
constructor() {}
async hashPassword(password: string): Promise<string> {
return await argon2.hash(password);
}
async verify(password: string, hash: string): Promise<boolean> {
return await argon2.verify(hash, password);
}
}
|