Files
mws.backend.dotnet/mws.infrastructure/Authentication/BcryptPasswordHasher.cs
T

10 lines
348 B
C#
Raw Normal View History

2026-08-13 23:10:22 +07:00
using Mws.Application.Auth;
namespace Mws.Infrastructure.Authentication;
public class BcryptPasswordHasher : IPasswordHasher
{
public string Hash(string password) => BCrypt.Net.BCrypt.HashPassword(password, BCrypt.Net.BCrypt.GenerateSalt());
public bool Verify(string password, string hash) => BCrypt.Net.BCrypt.Verify(password, hash);
}