<small id='8MGNp'></small><noframes id='8MGNp'>

    <tfoot id='8MGNp'></tfoot>
  1. <legend id='8MGNp'><style id='8MGNp'><dir id='8MGNp'><q id='8MGNp'></q></dir></style></legend>
        <bdo id='8MGNp'></bdo><ul id='8MGNp'></ul>
    1. <i id='8MGNp'><tr id='8MGNp'><dt id='8MGNp'><q id='8MGNp'><span id='8MGNp'><b id='8MGNp'><form id='8MGNp'><ins id='8MGNp'></ins><ul id='8MGNp'></ul><sub id='8MGNp'></sub></form><legend id='8MGNp'></legend><bdo id='8MGNp'><pre id='8MGNp'><center id='8MGNp'></center></pre></bdo></b><th id='8MGNp'></th></span></q></dt></tr></i><div id='8MGNp'><tfoot id='8MGNp'></tfoot><dl id='8MGNp'><fieldset id='8MGNp'></fieldset></dl></div>

    2. C++:如何在编译时加密字符串?

      时间:2023-12-03
          <bdo id='8olwh'></bdo><ul id='8olwh'></ul>

              <tfoot id='8olwh'></tfoot>

              <i id='8olwh'><tr id='8olwh'><dt id='8olwh'><q id='8olwh'><span id='8olwh'><b id='8olwh'><form id='8olwh'><ins id='8olwh'></ins><ul id='8olwh'></ul><sub id='8olwh'></sub></form><legend id='8olwh'></legend><bdo id='8olwh'><pre id='8olwh'><center id='8olwh'></center></pre></bdo></b><th id='8olwh'></th></span></q></dt></tr></i><div id='8olwh'><tfoot id='8olwh'></tfoot><dl id='8olwh'><fieldset id='8olwh'></fieldset></dl></div>
              1. <legend id='8olwh'><style id='8olwh'><dir id='8olwh'><q id='8olwh'></q></dir></style></legend>
                  <tbody id='8olwh'></tbody>

                <small id='8olwh'></small><noframes id='8olwh'>

                本文介绍了C++:如何在编译时加密字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我想在我的 .exe 中隐藏一些字符串,这样人们就不能简单地打开 .exe 并查看那里的所有字符串.我不关心加密方法的强度,所以我可能会使用 XOR 等.

                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 method, so I will probably use XOR etc.

                如何在编译时执行此操作?这样我的字符串就不会存储在 .exe 中,但加密版本会.然后,我每次都会使用我的解密功能在屏幕上显示这些字符串.

                How can I do this at compile time? That way my strings won't be stored in the .exe but the encrypted versions would. Then, I would just use my decrypting function every time to display those strings on screen.

                推荐答案

                您可以使用宏对其进行加密或编写自己的预处理器

                you can encrypt it using macros or write your own preprocessor

                #define CRYPT8(str) { CRYPT8_(str "") }
                #define CRYPT8_(str) (str)[0] + 1, (str)[1] + 2, (str)[2] + 3, (str)[3] + 4, (str)[4] + 5, (str)[5] + 6, (str)[6] + 7, (str)[7] + 8, ''
                
                // calling it
                const char str[] = CRYPT8("ntdll");

                这篇关于C++:如何在编译时加密字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:使用 VC++ 2008 编译引用 STLport-5.1.4 的应用程序时出现 LNK2001 错误 下一篇:如何在 Visual Studio 2008 C++ 中捕获被零除错误?

                相关文章

                <small id='b9IhD'></small><noframes id='b9IhD'>

                  <i id='b9IhD'><tr id='b9IhD'><dt id='b9IhD'><q id='b9IhD'><span id='b9IhD'><b id='b9IhD'><form id='b9IhD'><ins id='b9IhD'></ins><ul id='b9IhD'></ul><sub id='b9IhD'></sub></form><legend id='b9IhD'></legend><bdo id='b9IhD'><pre id='b9IhD'><center id='b9IhD'></center></pre></bdo></b><th id='b9IhD'></th></span></q></dt></tr></i><div id='b9IhD'><tfoot id='b9IhD'></tfoot><dl id='b9IhD'><fieldset id='b9IhD'></fieldset></dl></div>
                  <legend id='b9IhD'><style id='b9IhD'><dir id='b9IhD'><q id='b9IhD'></q></dir></style></legend>
                  1. <tfoot id='b9IhD'></tfoot>
                      <bdo id='b9IhD'></bdo><ul id='b9IhD'></ul>