Java xor XORInto(byte[] dest, byte[] src)

Here you can find the source of XORInto(byte[] dest, byte[] src)

Description

Utility function to XOR two byte arrays

License

Open Source License

Parameter

Parameter Description
dest destination array
src source array

Declaration

public static void XORInto(byte[] dest, byte[] src) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /** Utility function to XOR two byte arrays
     * @param dest destination array/*from  w ww  .j  a  v a 2 s .c om*/
     * @param src  source array
     */
    public static void XORInto(byte[] dest, byte[] src) {
        for (int i = 0; i < dest.length; i++) {
            dest[i] ^= src[i];
        }
    }
}

Related

  1. xor(T l1, T l2)
  2. xor32(byte[] a, short aOffset, byte[] b, short bOffset, byte[] result, short offset)
  3. xorFolding(final long hash, final int shift)
  4. xorInPlace(byte[] source, int sourceOffset, byte[] destination, int destinationOffset, int size)
  5. xorInt64OverBytesLE(long val, byte[] data, int ofs)
  6. xorLong(byte[] aBuffer, int aOffset, long aValue)
  7. xorMV(byte[] i_Value)
  8. xorOperation(String r1, String r2)
  9. xorSalsa8(int di, int xi, int[] X)