<< Click to Display Table of Contents >> Navigation: Code Virtualizer > FAQ > General > Can I use code virtualizer for protecting data sections? I need to protect a hard coded password needed by the (client) application. |
Sorry but CodeVirtualizer can only virtualize the code section (not data sections). You can use the STR_ENCRYPT macro in the function that access to your password, so that password will go encrypted while it's not required by your application.
Another workaround to have your password encrypted till it’s required:
1) Compile your application with the hard coded password in your data section.
2) Create a simple tool which opens your compiled application and search the beginning of the password string.
3) Encrypt the password string. Any simple encryption algorithm will do. So, you replace the original password string with the encrypted one. Now, you have the original application compiled but with the encrypted password on it.
When your protected application is running and you want to access to the password string, you need to have a function (decryptor) which will decode the password. You should put a VIRTUALIZER macro to the decryptor function to protect it against reverse engineering. As soon as the decrypted password is not required, remove it from memory or encrypt it again.