public static final void xor(ByteBuffer output, ByteBuffer x, ByteBuffer y, int len) {
    if (len < 0 || x.remaining() < len || y.remaining() < len || output.remaining() < len) {
      throw new IllegalArgumentException(
          "That combination of buffers, offsets and length to xor result in out-of-bond accesses.");
    }
    for (int i = 0; i < len; i++) {
      output.put((byte) (x.get() ^ y.get()));
    }
  }
Computes the xor of two byte buffers, specifying the length to xor, and stores the result to
{@code output}.
java_src/src/main/java/com/google/crypto/tink/subtle/Bytes.java