public static final byte[] xorEnd(final byte[] a, final byte[] b) {
    if (a.length < b.length) {
      throw new IllegalArgumentException("xorEnd requires a.length >= b.length");
    }
    int paddingLength = a.length - b.length;
    byte[] res = Arrays.copyOf(a, a.length);
    for (int i = 0; i < b.length; i++) {
      res[paddingLength + i] ^= b[i];
    }
    return res;
  }
xors b to the end of a.

@return a new byte[] of length x.length.
java_src/src/main/java/com/google/crypto/tink/subtle/Bytes.java