16 lines
465 B
C#
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);
|
|
}
|
|
}
|
|
}
|