Add project files.

This commit is contained in:
rfi
2023-10-06 20:29:27 +07:00
parent 43952cd917
commit 859e3fa042
18 changed files with 554 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
namespace AscNet.Common.Util
{
public static class Crypto
{
public static byte[] XORCrypt(byte[] data, byte[] key)
{
byte[] encryptedData = new byte[data.Length];
for (int i = 0; i < data.Length; i++)
encryptedData[i] = (byte)(data[i] ^ key[i % key.Length]);
return encryptedData;
}
}
}