(byte[] x, byte[] y)
| 33 | |
| 34 | |
| 35 | public static byte[] Xor(byte[] x, byte[] y) { |
| 36 | int min =0; |
| 37 | if(x.length>y.length){ |
| 38 | min = y.length; |
| 39 | }else{ |
| 40 | min = x.length; |
| 41 | } |
| 42 | byte[] temp = new byte[min]; |
| 43 | for (int i = 0; i < min; i++) { |
| 44 | temp[i] = (byte) (x[i] ^ y[i]); |
| 45 | } |
| 46 | return temp; |
| 47 | } |
| 48 | } |