Resource Encryption
Introduction
Resource Encryption in Dotfuscator streamlines the configuration process through an intuitive graphical user interface. This feature introduces a new tab, which allows selecting resources for encryption. You can toggle encryption functionality on or off directly from the UI, ensuring flexibility in managing your encryption settings with ease. The interface provides checkboxes next to each node for convenient selection of resources to be encrypted.
Implementing Resource Encryption
In this example, we'll create a new console project in the .NET 5+ framework. After adding resources to the project, we'll proceed to build it in release mode. Upon successful completion of the build process, we'll proceed with the following steps:
Access Dotfuscator: Begin by launching the Dotfuscator application.
Configure Resource Encryption Settings: Navigate to the settings and ensure that the "Disable Resource Encryption" option is set to "No".
Input Resource Files: Upload the desired .dll file containing the resources you wish to encrypt.
Select Resources for Encryption: Head to the resource encryption tab and visually select the resources you want to encrypt.
Initiate Build Process: Click on the build button to start the encryption process.
Verify Encrypted Resources: Navigate to the Dotfuscated folder and open the .dll file using ILSpy or similar tool. You'll be able to observe the encrypted resources.
Example of Encrypting Satellite Assemblies
For this example, we'll create a new console project in the .NET 5+ framework. After adding satellite resources to the project, we'll proceed to build it in release mode. Upon successful completion of the build process, we'll proceed with the following steps.
Access Dotfuscator: Launch Dotfuscator to begin the encryption process.
Configure Resource Encryption Settings: Navigate to the settings and modify the "Disable Resource Encryption" option to "No" to enable encryption.
Input Resource Files: Upload the desired .dll file containing the resources intended for encryption.
Select Resources for Encryption: Move to the resource encryption tab and visually select all resources you wish to encrypt, ensuring comprehensive protection.
Initiate Build Process: Click on the build button to commence the encryption process. Upon successful completion, you'll receive confirmation.
Verify Encrypted Resources: Navigate to the Dotfuscated folder and open the .dll file using ILSpy to view the encrypted resources.
Confirm Encrypted Resources in Culture Folder: Explore the Culture folder within the Dotfuscated directory and open the .dll file using ILSpy. Note that the encrypted resources maintain the same names as the main assembly (.dll).
If you need help creating satellite assemblies, please refer to the following resource: Create satellite assemblies - .NET | Microsoft Learn