Skip to Content
New release 12 available 🎉
ObfuscatorResource Encryption

Resource Encryption

Babel Obfuscator offers the capability to compress and encrypt embedded resources, providing both resource protection and reducing the overall size of the assembly. When resources are encrypted, they remain securely stored within the assembly and are loaded dynamically at runtime when required.

Encrypting embedded resources can safeguard sensitive information and valuable assets from unauthorized access. This is particularly useful when dealing with resources in WPF applications, as it prevents tools like .NET Reflector from inspecting and extracting these resources.

Deploying on FIPS-enabled hosts? Encrypted resources are decrypted at runtime through the platform crypto provider, so a container running on a FIPS-enabled host without a certified OpenSSL FIPS provider can fail to load them. See FIPS Compliance for the cause and the fix.

Command Line

Enabling resource compression can be achieved through the command line by using the following option:

babel MyApp.exe --resource compress=on --resource encrypt=on

It’s important to note that while resource compression can help save disk space, it may result in a slight increase in the application’s startup time due to the need for resource decompression.

MSBuild Babel Task

<PropertyGroup> <ResourceEncryption>compress=true;encrypt=true;true</ResourceEncryption> </PropertyGroup> <Babel ResourceEncryption="$(ResourceEncryption)" />

Babel Desktop

Select the assembly on the project canvas and, in the properties panel, set ResourceEncryption in the Code encryption group. Turn on its compress and/or encrypt entries to choose whether managed resources are compressed, encrypted or both. See Obfuscation Projects for how to work with projects in Babel Desktop.

It is possible to disable resource encryption and compression for some managed resources using XML rules.

The following XML rule will disable resource encryption for a specific cursor resource that does not need to be protected.

<Rules> <Rule name="rule1" feature="resource encryption" exclude="true"> <Target>Resources</Target> <Pattern>Babel.HexEdit.Resources.Cursor.RightArrow.cur</Pattern> <Description>Disable Resource Encryption</Description> </Rule> </Rules>

By utilizing resource compression and encryption, you can protect your valuable resources, maintain the integrity of your application, and deter reverse-engineering attempts.

Last updated on