What is the best way to compare two byte arrays in C#? I do not wish to use a for loop.
I have the following arrays:
byte[] hashBytes = Convert.FromBase64String(pass);
and:
byte[] hash = pbkdf2.GetBytes(20);
I have tried using:
bool isEqual = Enumerable.SequenceEqual(hashBytes, hash);
However, it always returns false.