public static bool AreEqual(byte[] X, byte[] Y) { if (X.Length != Y.Length) return false; for (var i = 0; i < X.Length; i++) { if (X[i] != Y[i]) return false; } return true; }