2025-05-11 19:28:19 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Obfuz.EncryptionVM
|
2025-05-11 12:48:53 +08:00
|
|
|
|
{
|
|
|
|
|
public interface IEncryptionInstruction
|
|
|
|
|
{
|
|
|
|
|
int Encrypt(int value, int[] secretKey, int salt);
|
|
|
|
|
|
|
|
|
|
int Decrypt(int value, int[] secretKey, int salt);
|
2025-05-11 19:28:19 +08:00
|
|
|
|
|
|
|
|
|
void GenerateEncryptCode(List<string> lines, string indent);
|
|
|
|
|
|
|
|
|
|
void GenerateDecryptCode(List<string> lines, string indent);
|
2025-05-11 12:48:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public abstract class EncryptionInstructionBase : IEncryptionInstruction
|
|
|
|
|
{
|
|
|
|
|
public abstract int Encrypt(int value, int[] secretKey, int salt);
|
|
|
|
|
public abstract int Decrypt(int value, int[] secretKey, int salt);
|
2025-05-11 19:28:19 +08:00
|
|
|
|
|
|
|
|
|
public abstract void GenerateEncryptCode(List<string> lines, string indent);
|
|
|
|
|
public abstract void GenerateDecryptCode(List<string> lines, string indent);
|
2025-05-11 12:48:53 +08:00
|
|
|
|
}
|
|
|
|
|
}
|