Skip to main content
Version: 2024.2

4.6. Advanced String Encryption Options

String encryption is a technique that encrypts every string in the assembly. It is always turned on by default.

However, you may prefer to turn this feature off in some situations. To do that, you can use the instructions below.

Instructions on disabling string encryption

  1. Open obfuscatable project inside the IDE

  2. Add new source file to the project and call it ObfuscationSettings.cs (for C#) or ObfuscationSettings.vb (for Visual Basic .NET). You may prefer to use another name instead of ObfuscationSettings.cs or ObfuscationSettings.vb

  3. Fill ObfuscationSettings.cs with the following content (C#):

    using System;
    using System.Reflection;

    [assembly: Obfuscation(Feature = "string encryption", Exclude = true)]

    For Visual Basic .NET, fill ObfuscationSettings.vb with the following content:

    Imports System
    Imports System.Reflection

    <Assembly: Obfuscation(Feature:="string encryption", Exclude:=True)>
Note

Please note that string encryption can be controlled at the assembly level only. For example, it is impossible to disable string encryption for some specific class or method; it is possible to do this just for a whole assembly.