bytesEqualConst static method

bool bytesEqualConst(
  1. List<int> a,
  2. List<int> b
)

Implementation

static bool bytesEqualConst(List<int> a, List<int> b) {
  if (a.length != b.length) return false;

  int diff = 0;
  for (int i = 0; i < a.length; i++) {
    diff |= (a[i] ^ b[i]);
  }
  return diff == 0;
}