Overview
Resource Encryption in PreEmptive Protection™ Dotfuscator™ encrypts resources packaged in an app or library, making it more difficult to copy or alter them. During the build process, Dotfuscator encrypts the resources and injects the necessary code to decrypt them at runtime. This feature supports both embedded and satellite resources.
Limitations
- Mac Catalyst: Resource encryption does not currently support Mac Catalyst ARM64 assemblies.
Implementing Resource Encryption
Follow these steps to encrypt resources in a .NET 5+ console project:
Build your project in Release mode.
Open Dotfuscator.
Enable the feature by navigating to Settings and modifying the Disable Resource Encryption option to No.
Input Resource Files: Upload the
.dllfile that contains the resources you want to encrypt.Select the resources you wish to encrypt in the Resource Encryption tab.
Click the Build button to start the encryption process.
Verify the encryption: go to the Dotfuscated folder and open the
.dllfile using ILSpy or similar tool to observe the encrypted resources.
Encrypting Satellite Assemblies
To encrypt satellite assemblies in a .NET 5+ project, follow these steps:
- Create a console project in the .NET 5+ framework with satellite assemblies. For more information, see Create satellite assemblies for .NET apps.
- Open Dotfuscator.
- Navigate to Settings and modify the Disable Resource Encryption option to No to enable encryption.
- Input Resource Files: Upload the desired
.dllfile containing the resources intended for encryption. - Go to the Resource Encryption tab and select all resources you wish to encrypt.
- Click on the Build option to initiate the encryption process.
- Navigate to the Dotfuscated folder and open the
.dllfile using ILSpy to verify the encrypted resources. - Navigate to the Culture subdirectory within the Dotfuscated directory and open the
.dllfile using ILSpy. Note that the encrypted resources maintain the same names as the main assembly(.dll).