StrEncrypt macro

<< Click to Display Table of Contents >>

Navigation:  WinLicense > SecureEngine® Macros >

StrEncrypt macro

The STR_ENCRYPT/STR_ENCRYPTW macro allows you to mark regions of code where all referenced strings inside the region will be encrypted in protection time and decrypted in runtime when required by the target application. The decryption is performed inside the SecureEngine Virtual Machine and the location of the decrypted string is different from the original one in the unprotected application. The original location of the string is destroyed and never used again in the protected application.


If you are using Unicode strings in your application, you have to use the macro STR_ENCRYPTW which can process Unicode strings.


NOTE: The current version of SecureEgine® does not support this macro for .NET languages or Visual Basic compiled in PCode mode.


Click to expand/collapseShow Delphi Macro Usage
Click to expand/collapseShow C/C++ Macro Usage
Click to expand/collapseShow Visual Basic Macro Usage




For further protection you can put a VM macro around the "STR_ENCRYPT" macro, so all your code area where your strings are used is also virtualized. Example:






 ' your code goes here






There are some internal options that can be added to increase the protection of the STR_ENCRYPT macro. You can add the following entries in the Advanced Options panel:


The string will be decrypted on an allocated block in the heap



The decrypted string on the heap will be destroyed when the STR_ENCRYPT_END marker is executed