obfuz/Editor/EncryptionVM/EncryptionInstructionWithOp...

26 lines
668 B
C#
Raw Normal View History

2025-05-11 12:53:24 +08:00
namespace Obfuz.EncryptionVM
2025-05-06 09:13:24 +08:00
{
2025-05-11 12:48:53 +08:00
public class EncryptionInstructionWithOpCode
2025-05-06 09:13:24 +08:00
{
public readonly ushort code;
2025-05-11 12:48:53 +08:00
public readonly IEncryptionInstruction function;
2025-05-06 09:13:24 +08:00
2025-05-11 12:48:53 +08:00
public EncryptionInstructionWithOpCode(ushort code, IEncryptionInstruction function)
2025-05-06 09:13:24 +08:00
{
this.code = code;
this.function = function;
}
public int Encrypt(int value, int[] secretKey, int salt)
{
return function.Encrypt(value, secretKey, salt);
}
public int Decrypt(int value, int[] secretKey, int salt)
{
return function.Decrypt(value, secretKey, salt);
}
}
}