This repository has been archived on 2025-01-22. You can view files and clone it, but cannot push or open issues or pull requests.
SCHALE.GameServer/SCHALE.Common/Crypto/XOR.cs

15 lines
329 B
C#
Raw Permalink Normal View History

2024-04-18 07:12:10 +00:00
namespace SCHALE.Common.Crypto
{
public static class XOR
{
2024-04-21 00:21:57 +00:00
public static void Crypt(byte[] bytes, byte[] key, uint offset = 0)
2024-04-18 07:12:10 +00:00
{
while (offset < bytes.Length)
{
2024-04-21 00:21:57 +00:00
bytes[offset] ^= key[offset % key.Length];
offset++;
2024-04-18 07:12:10 +00:00
}
}
}
}