obfuz/Editor/ObfusPasses/ConstObfus/IObfuscationPolicy.cs

37 lines
1.0 KiB
C#
Raw Normal View History

2025-04-21 21:02:47 +08:00
using dnlib.DotNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2025-05-04 19:55:10 +08:00
namespace Obfuz.ObfusPasses.ConstObfus
2025-04-21 21:02:47 +08:00
{
public struct ConstCachePolicy
{
public bool cacheConstInLoop;
public bool cacheConstNotInLoop;
public bool cacheStringInLoop;
public bool cacheStringNotInLoop;
}
2025-05-06 09:13:24 +08:00
public interface IObfuscationPolicy
2025-04-21 21:02:47 +08:00
{
bool NeedObfuscateMethod(MethodDef method);
ConstCachePolicy GetMethodConstCachePolicy(MethodDef method);
bool NeedObfuscateInt(MethodDef method, bool currentInLoop, int value);
2025-04-21 21:02:47 +08:00
bool NeedObfuscateLong(MethodDef method, bool currentInLoop, long value);
2025-04-21 21:02:47 +08:00
bool NeedObfuscateFloat(MethodDef method, bool currentInLoop, float value);
2025-04-21 21:02:47 +08:00
bool NeedObfuscateDouble(MethodDef method, bool currentInLoop, double value);
2025-04-21 21:02:47 +08:00
bool NeedObfuscateString(MethodDef method, bool currentInLoop, string value);
2025-04-23 13:46:50 +08:00
bool NeedObfuscateArray(MethodDef method, bool currentInLoop, byte[] array);
2025-04-21 21:02:47 +08:00
}
}