private boolean arraysAreEqual(byte[] a, byte[] 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;
    }
Constant-time array comparison.  Since we are using this to compare keys, we want to
ensure there's no opportunity for a timing attack.
common/src/main/java/org/conscrypt/OpenSSLAeadCipher.java