Java xor xorMV(byte[] i_Value)

Here you can find the source of xorMV(byte[] i_Value)

Description

xor MV

License

Open Source License

Declaration

public static byte[] xorMV(byte[] i_Value) 

Method Source Code

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

public class Main {

    public static byte[] xorMV(byte[] i_Value) {
        return xorMV(i_Value, 0, i_Value.length);
    }/*www . j  a v a  2 s .  com*/

    public static byte[] xorMV(byte[] i_Value, int i_StartIndex, int i_Len) {
        byte[] v_Result = new byte[i_Value.length];
        int v_MaxIndex = i_StartIndex + i_Len;

        for (int v_Index = 0; v_Index < i_Value.length; v_Index++) {
            if (i_StartIndex <= v_Index && v_Index < v_MaxIndex) {
                v_Result[v_Index] = (byte) (i_Value[v_Index] ^ Byte.MAX_VALUE);
            } else {
                v_Result[v_Index] = i_Value[v_Index];
            }
        }

        return v_Result;
    }
}

Related

  1. xorFolding(final long hash, final int shift)
  2. xorInPlace(byte[] source, int sourceOffset, byte[] destination, int destinationOffset, int size)
  3. xorInt64OverBytesLE(long val, byte[] data, int ofs)
  4. XORInto(byte[] dest, byte[] src)
  5. xorLong(byte[] aBuffer, int aOffset, long aValue)
  6. xorOperation(String r1, String r2)
  7. xorSalsa8(int di, int xi, int[] X)
  8. xorShift(int x)