private static bool CompareArray(byte[] a, byte[] b, int len) { for (int k = 0; k < len; ++k) { if (a[k] != b[k]) { return false; } } return true; }