mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-11-23 19:42:51 +01:00
13 lines
330 B
C#
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);
|
|
}
|
|
}
|