obfuz/Runtime/EncryptionService.cs

24 lines
607 B
C#
Raw Normal View History

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 19:39:09 +08:00
public static void EncryptBlock(byte[] data, long ops, int salt)
2025-04-23 18:43:14 +08:00
{
2025-05-07 19:39:09 +08:00
_encryptor.EncryptBlock(data, ops, salt);
2025-05-07 10:14:15 +08:00
}
2025-05-07 19:39:09 +08:00
public static void DecryptBlock(byte[] data, long ops, int salt)
2025-05-07 10:14:15 +08:00
{
2025-05-07 19:39:09 +08:00
_encryptor.DecryptBlock(data, ops, salt);
2025-04-23 18:43:14 +08:00
}
}
}