mirror of
https://github.com/raphaeIl/Novaria.git
synced 2025-12-13 06:54:48 +01:00
15 lines
330 B
C#
15 lines
330 B
C#
namespace Novaria.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++;
|
|
}
|
|
}
|
|
}
|
|
}
|