1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-10-17 03:42:50 +02:00
Minecraft-Phantom-Panel/Common/Phantom.Common.Data.Web/Users/UserPasswords.cs
2023-12-05 14:27:55 +01:00

13 lines
330 B
C#

namespace Phantom.Common.Data.Web.Users;
public static class UserPasswords {
public static string Hash(string password) {
return BCrypt.Net.BCrypt.HashPassword(password, workFactor: 12);
}
public static bool Verify(string password, string hash) {
// TODO rehash
return BCrypt.Net.BCrypt.Verify(password, hash);
}
}