using Microsoft.AspNetCore.Identity; using Modules.Account.Domain.Gateways; namespace Modules.Account.Application; public class PasswordHasher : IPasswordHasher { private readonly PasswordHasher _hasher; public PasswordHasher() { _hasher = new(); } public string HashPassword(Domain.Entities.Account account, string password) => _hasher.HashPassword(account, password); public bool VerifyPassword(Domain.Entities.Account account, string password) => _hasher.VerifyHashedPassword(account, password, account.HashedPassword) != PasswordVerificationResult.Failed; }