Java xor xorLong(byte[] aBuffer, int aOffset, long aValue)

Here you can find the source of xorLong(byte[] aBuffer, int aOffset, long aValue)

Description

xor Long

License

Open Source License

Declaration

public static void xorLong(byte[] aBuffer, int aOffset, long aValue) 

Method Source Code

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

public class Main {
    public static void xorLong(byte[] aBuffer, int aOffset, long aValue) {
        aBuffer[aOffset] ^= (byte) aValue;
        aBuffer[aOffset + 1] ^= (byte) (aValue >>> 8);
        aBuffer[aOffset + 2] ^= (byte) (aValue >>> 16);
        aBuffer[aOffset + 3] ^= (byte) (aValue >>> 24);
        aBuffer[aOffset + 4] ^= (byte) (aValue >>> 32);
        aBuffer[aOffset + 5] ^= (byte) (aValue >>> 40);
        aBuffer[aOffset + 6] ^= (byte) (aValue >>> 48);
        aBuffer[aOffset + 7] ^= (byte) (aValue >>> 56);
    }/*from ww  w  .  j a  v  a2 s.c o m*/
}

Related

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