mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-04 00:56:19 +02:00
Add TcpRpc server and client and split crypto code into multiple classes
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using RemSox.Utils;
|
||||
|
||||
namespace RemSox.Networking;
|
||||
|
||||
internal class AesPacketCrypto(byte[] key) : IPacketCrypto
|
||||
{
|
||||
public byte[] Decrypt(byte[] data)
|
||||
{
|
||||
return AesGcmCrypto.Decrypt(data, key);
|
||||
}
|
||||
|
||||
public byte[] Encrypt(byte[] data)
|
||||
{
|
||||
return AesGcmCrypto.Encrypt(data, key);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user