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/XORCryptor.cs

19 lines
416 B
C#
Raw Normal View History

namespace MX.Core.Crypto
{
/// <author>Kesunorin</author>
internal class XORCryptor
{
private readonly uint ENCRYPTION_KEY = 2948064217;
public bool Encrypt(byte[] data, int offset, int length)
{
for (int i = offset; i < offset + length; i++)
{
data[i] ^= (byte)ENCRYPTION_KEY;
}
return true;
}
}
}