1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

Initial .net 6 upgrades

This commit is contained in:
RaidMax
2022-01-26 10:32:16 -06:00
parent 513f0afd34
commit 6f6dd035ee
170 changed files with 2805 additions and 2577 deletions

View File

@ -5,13 +5,12 @@ namespace SharedLibraryCore.Helpers
public class Hashing
{
/// <summary>
/// Generate password hash and salt
/// Generate password hash and salt
/// </summary>
/// <param name="password">plaintext password</param>
/// <returns></returns>
public static string[] Hash(string password, string saltStr = null)
{
string hash;
string salt;
var CryptoSvc = new PBKDF2();
@ -21,22 +20,19 @@ namespace SharedLibraryCore.Helpers
{
hash = CryptoSvc.Compute(password);
salt = CryptoSvc.Salt;
return new string[]
return new[]
{
hash,
salt
};
}
else
hash = CryptoSvc.Compute(password, saltStr);
return new[]
{
hash = CryptoSvc.Compute(password, saltStr);
return new string[]
{
hash,
""
};
}
hash,
""
};
}
}
}
}