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