Add ProcessXorInt implementation

This commit is contained in:
Daniel Walder 2016-07-17 12:35:31 +10:00
parent 6e18002b0a
commit 6e36771ef8
1 changed files with 11 additions and 1 deletions

View File

@ -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;
}
}
}