public static boolean maskedEquals(byte[] a, byte[] b, @Nullable byte[] mask) {
        if (a == null || b == null) return a == b;
        Preconditions.checkArgument(a.length == b.length, "Inputs must be of same size");
        if (mask == null) return Arrays.equals(a, b);
        Preconditions.checkArgument(a.length == mask.length, "Mask must be of same size as inputs");
        for (int i = 0; i < mask.length; i++) {
            if (!maskedEquals(a[i], b[i], mask[i])) return false;
        }
        return true;
    }
A utility class for handling unsigned integers and unsigned arithmetics, as well as syntactic
sugar methods for ByteBuffer. Useful for networking and packet manipulations.
{@hide}
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/BitUtils.java