I am writing a C app on Windows with MinGW/gcc. I need to use the #include directive to include a file that contains an encrypted string. The string will be decrypted at runtime. I want to do this so the string will not be visible if looking at the executable with a hex editor.
I tried this, but it doesn't work. You get the idea, though:
char *hidden_str =
#include "encrypted_text.dat"
There may be unescaped stuff in there that's confusing the compiler. I don't know. I don't know what happens to it after it's encrypted.
If there's a better approach to this, I'm open to it.