17 lines
368 B
C#
17 lines
368 B
C#
|
|
using PruebaGentle.Core.Interfaces;
|
||
|
|
|
||
|
|
namespace PruebaGentle.Infrastructure.Services;
|
||
|
|
|
||
|
|
public class PasswordHasher : IPasswordHasher
|
||
|
|
{
|
||
|
|
public string Hash(string password)
|
||
|
|
{
|
||
|
|
return BCrypt.Net.BCrypt.HashPassword(password);
|
||
|
|
}
|
||
|
|
|
||
|
|
public bool Verify(string password, string hash)
|
||
|
|
{
|
||
|
|
return BCrypt.Net.BCrypt.Verify(password, hash);
|
||
|
|
}
|
||
|
|
}
|