Here you can find the source of xor(byte[] b1, byte[] b2)
private static byte[] xor(byte[] b1, byte[] b2)
//package com.java2s; public class Main { private static byte[] xor(byte[] b1, byte[] b2) { byte[] result = new byte[8]; for (int i = 0; i < 8; i++) { result[i] = (byte) (b1[i] ^ b2[i]); }//from w w w . ja v a 2 s . c o m return result; } }