• Reference KB000025
  • Created 30-4-2010

How can I adjust the obfuscation behavior?

The features that DeepSea Obfuscator will perform are controlled by settings found in the assemblies themselves by means of obfuscation attributes or in an external configuration file.

The .NET framework has specified two attributes that are used to specify obfuscation features:

  • System.Reflection.ObfuscationAttribute
  • System.Reflection.ObfuscateAssemblyAttribute

Here's an example of an obfuscation attribute used to prevent a type from renaming.


[Obfuscation]
public class MyClass { }
1 [Obfuscation]
2 public class MyClass { }

Here's another example of an obfuscation attribute. It is used to prevent string encryption in all methods of a type.


[Obfuscation(Feature="encrypt-strings", ApplyToMembers=true)]
public class MyClass { ... }
1 [Obfuscation(Feature="encrypt-strings", ApplyToMembers=true)]
2 public class MyClass { ... }

A full description of these attributes and their semantics is given in Obfuscation Reference in the User guide.