Here you can find the source of xorInPlace(byte[] source, int sourceOffset, byte[] destination, int destinationOffset, int size)
public static void xorInPlace(byte[] source, int sourceOffset, byte[] destination, int destinationOffset, int size)
//package com.java2s; //License from project: Open Source License public class Main { public static void xorInPlace(byte[] source, int sourceOffset, byte[] destination, int destinationOffset, int size) { xor(destination, destinationOffset, source, sourceOffset, destination, destinationOffset, size); }// w w w . ja va 2s . co m public static void xor(byte[] firstBytes, int firstOffset, byte[] secondBytes, int secondOffset, byte[] outBytes, int outOffset, int size) { for (int i = 0; i < size; i++) { outBytes[outOffset + i] = (byte) (firstBytes[firstOffset + i] ^ secondBytes[secondOffset + i]); } } }