Dotfuscator User's Guide
Renaming Options

Dotfuscator allows several options that govern how namespaces are treated by the renaming algorithm. These are: "keepnamespace" and "keephierarchy" and are explained in detail in the section on identifier renaming.

Dotfuscator allows you to specify that obfuscated type names must be prefixed with a default or user-specified string. To use this feature, specify the prefix option. Please see Renaming Prefixes for full details.

Turning on the Renaming Prefix Feature
Copy Code
<renaming>
   <!-- this turns on the renaming prefix feature -->
   <option>prefix</option>
...
</renaming>

Dotfuscator also allows an enhanced level of Overload Induction that adds return type to the mix. The option to turn this on is: enhancedOI and is explained in detail in the section on overload induction method renaming.

Apply Enhanced Overload Induction
Copy Code
<renaming> <!--  Apply Enhanced Overload Induction. -->
 <option>enhancedOI</option>
 ...
</renaming>

Enhanced Overload Induction is, by default, not applied to classes marked as serializable. If you wish to apply enhanced overload induction to all types, including serializable types, use the enhancedOIOnSerializables option:

Apply Enhanced Overload Induction Serializeable Option
Copy Code
<renaming>

<!--  Apply enhanced Overload Induction even on serializable types. -->
<option>enhancedOIOnSerializables</option>
...
</renaming>

You can change the renaming algorithm to rename types and members in a way that’s compatible with the XML Serializer.

Change Renaming Algorithm to be Compatible with XML Serializer
Copy Code
<renaming>

<!--  XML Serialization compatibility. -->
<option>xmlserialization</option>
...
</renaming>

For more information, see XML Serialization and Renaming.

Using the <explicitoverrides> renaming option lets Dotfuscator rename more methods by allowing it to introduce explicit (i.e. non-syntactic) method overrides. In other words, overridden methods can have different names than the methods they override. For example, ordinarily, if a method overrides Object.ToString(), Dotfuscator would not be able to rename it without breaking the override relationship, since typically the Object class is not in an input assembly and therefore its ToString() would not be renamed. With this setting, Dotfuscator can rename the overriding method and introduce metadata that tells the CLR that the method is meant to override Object.ToString(). For more information, see Introduce Explicit Method Overrides When Renaming.

Introduce Explicit Method Overrides
Copy Code
<renaming>
<!-- Allow overriding methods to have different names than the
       methods they override -->
   <option>explicitoverrides</option>
</renaming>

If you want to rename overloaded methods with the same name, then you would not use the <explicitoverrides> renaming option.

Using the <randomizeRenaming> option causes Dotfuscator to assign the new names in a non-linear order. So instead of assigning Lower Alpha names in the order {a, b, c, d,...}, you would get something more like {u, p, k, f,...}. This option will work with any Renaming Scheme.

Use Random Name Assignment
Copy Code
<renaming>
  <!-- Use random name assignment -->
  <option>randomizeRenaming</option>
...
</renaming>

Note: Renaming options are not case sensitive.

 

 


© 2016 PreEmptive Solutions, LLC. All Rights Reserved.

www.preemptive.com