ShoppingApp/Weifer.ShoppingApp.API/Controllers/AuthenticationController.cs
2024-02-25 13:22:48 +01:00

16 lines
465 B
C#

namespace Weifer.ShoppingApp.API.Controllers
{
public class AuthenticationController
{
public string HashPassword(string password)
{
string hashedPassword = BCrypt.Net.BCrypt.HashPassword(password);
return hashedPassword;
}
public bool VerifyPassword(string password, string hashedPassword)
{
return BCrypt.Net.BCrypt.Verify(password, hashedPassword);
}
}
}