C++: How to encrypt strings at compile time?

前端 未结 10 1264
北荒
北荒 2020-12-18 21:40

I want to hide some strings in my .exe so people can\'t simply just open the .exe and look at all the strings there. I don\'t care about the strength of the encrypting metho

10条回答
  •  佛祖请我去吃肉
    2020-12-18 22:40

    You can't encrypt strings (string literals) by С++ compiler or preprocessor, but you can write a pre-build tool which will parse your source code, and encrypt strings.

    Or, you can try to use boost::mpl::string.

提交回复
热议问题