2025-04-23 18:43:14 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Obfuz
|
|
|
|
|
{
|
|
|
|
|
public static class EncryptionService
|
|
|
|
|
{
|
2025-04-23 18:58:44 +08:00
|
|
|
|
private static readonly IEncryptor _encryptor = new DefaultEncryptor(new byte[] { 0x1A, 0x2B, 0x3C, 0x4D });
|
|
|
|
|
|
2025-05-07 10:14:15 +08:00
|
|
|
|
public static void EncryptBlock(byte[] data, int salt)
|
2025-04-23 18:43:14 +08:00
|
|
|
|
{
|
2025-05-07 10:14:15 +08:00
|
|
|
|
_encryptor.EncryptBlock(data, salt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void DecryptBlock(byte[] data, int salt)
|
|
|
|
|
{
|
|
|
|
|
_encryptor.DecryptBlock(data, salt);
|
2025-04-23 18:43:14 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|