Add ProcessXorInt implementation
This commit is contained in:
parent
6e18002b0a
commit
6e36771ef8
|
@ -33,7 +33,7 @@ namespace Kaitai
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
@ -356,5 +356,15 @@ namespace Kaitai
|
|||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
public byte[] ProcessXorInt(byte[] value, int xorValue)
|
||||
{
|
||||
var result = new byte[value.Length];
|
||||
for (int i = 0; i < value.Length; i++)
|
||||
{
|
||||
result[i] = (byte) (value[i] ^ xorValue);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue