SCHALE.GameServer/SCHALE.Common/Crypto/XOR.cs

15 lines
329 B
C#

namespace SCHALE.Common.Crypto
{
public static class XOR
{
public static void Crypt(byte[] bytes, byte[] key, uint offset = 0)
{
while (offset < bytes.Length)
{
bytes[offset] ^= key[offset % key.Length];
offset++;
}
}
}
}