/// <summary> /// Compare if the passwords match /// </summary> public static bool CheckPassword(string MasterKeyCandidate, byte[] MasterKeyHash) => CryptoFunctions.SlowEquals(CryptoFunctions.SHA3512(Encoding.UTF8.GetBytes(MasterKeyCandidate)), MasterKeyHash);
public static CryptoRNGData GenerateCryptoRNGLoginData() { byte[] Salt = CryptoFunctions.GenerateCryptoSecureKey(Settings.SaltSize); byte[] IV = CryptoFunctions.GenerateCryptoSecureKey(Settings.IVSize); return(new CryptoRNGData(Salt, IV)); }