private boolean byteArrayEquals(byte[] left, byte[] right) {
        if (left != null && right != null) {
            if (left.length != right.length) return false;
            for(int i = 0; i < left.length; i++) {
                if (left[i] != right[i]) {
                    return false;
                }
            }
            return true;
        }

        if (left == null && right == null) return true;
        return false;
    }