Skip to Content
New release 12 available 🎉

Configuration

There are multiple ways to configure Values and Array Encryption in Babel Obfuscator. You can choose one of the following three methods based on your preference and project setup. See Supported Values for the meaning of each data type.

Command Line

Babel Obfuscator offers a command-line interface (CLI) that allows you to specify the desired encryption settings. Using the CLI, you can provide command-line arguments or options to enable encryption for values and arrays.

babel myapp.exe --values int32=on --values double=on

Enable every data type — integers, floating-point values and arrays — like this:

babel myapp.exe --values int32=on --values int64=on --values single=on --values double=on --values array=on

MSBuild Babel Task

If you’re using Microsoft Build (MSBuild) as your build system, Babel Obfuscator provides an MSBuild task that can be integrated into your project file. With this approach, you can configure the encryption settings within your project file using specific XML elements and attributes. This method simplifies the configuration process, especially for projects already utilizing MSBuild.

<PropertyGroup> <ValueEncryption> int32=true;int64=true;single=true;double=true;array=true;true </ValueEncryption> </PropertyGroup> <Babel ValueEncryption="$(ValueEncryption)" />

The <ValueEncryption> property is defined within the <PropertyGroup> element, allowing you to configure the encryption settings for values and arrays. The last occurrence of true within the <ValueEncryption> property acts as a global switch for the Values and Array Encryption feature. By setting it to true, you are indicating that the encryption should be enabled for all the specified data types. If you were to set it to false, it would disable encryption for all the specified data types.

Babel Desktop

Select the assembly on the project canvas and, in the properties panel, set ValueEncryption in the Code encryption group. Turn on the int32, int64, single, double and array entries for the value and array types you want to encrypt. See Obfuscation Projects for how to work with projects in Babel Desktop.

By encrypting the constant values and arrays, Babel Obfuscator ensures that even if the code is decompiled, the sensitive data remains encrypted and unreadable, making it significantly harder for attackers to extract the original values.

Last updated on