예제 #1
0
 public static bool ArgonHashStringVerify(byte[] hash, byte[] password)
 {
     if (password == null)
     {
         throw new ArgumentNullException("password", "Password cannot be null");
     }
     if (hash == null)
     {
         throw new ArgumentNullException("hash", "Hash cannot be null");
     }
     return(SodiumLibrary.crypto_pwhash_str_verify(hash, password, (long)password.Length) == 0);
 }