Compile-time string encryption

前端 未结 8 2290
悲哀的现实
悲哀的现实 2020-12-28 17:08

I don\'t want reverse-engineers to read the plain-text of hardcoded strings in my application. The trivial solution for this is using a simple XOR-Encryption. The problem is

8条回答
  •  春和景丽
    2020-12-28 17:46

    My preferred solution:

    // some header
    extern char const* const MyString;
    
    // some generated source
    char const* const MyString = "aioghaiogeubeisbnuvs";
    

    And then use your favorite scripting language to generate this one source file where you store the "encrypted" resources.

提交回复
热议问题