title: how to save hex of memory at pointer location in variable
body: <p>suppose</p>
  <pre><code>char *  x = &quot;aaa&quot;;
  </code></pre>
  <p>then  *x at hex ump = 61 61 61
  i want to save this value to some variable to pass it to txt file
  when i save it to var it change to &quot;aaa&quot; i want it to represent to HEX
  i had tried this</p>
  <pre><code>std::string getmac_encrypted()
  {
      // Load the necessary cipher
      EVP_add_cipher(EVP_aes_256_cbc());
  
      // plaintext, ciphertext, recovered text
      std::string x = exec(&quot;wmic csproduct get uuid / format:list&quot;);
      std::string after = md5(x.substr(17, 30));
      // secure_string ptext = (secure_string)after;
      secure_string ctext, rtext;
      secure_string ptext = after.c_str();
      byte key[KEY_SIZE], iv[BLOCK_SIZE];
      //gen_params(key, iv);
      WriteString(&quot;12345678901234567890123456789012&quot;, 0, (char*)key);
      WriteString(&quot;1234567890123456&quot;, 0, (char*)iv);
      aes_encrypt(key, 0, ptext, ctext);
      
     // std::cout &lt;&lt; ctext.size()-1 &lt;&lt; endl;
     
      //aes_decrypt(key, iv, ptext, rtext);
      int* a = (int*)&amp;ctext;
      DWORD WW = *(int*)a;
  
      // std::cout &lt;&lt; WW;
      char* ppPack = new char[200];
     // std::stringstream stream;
      for (byte i = 0; i &lt;= 48 ; i++)
      {
        
         WriteByte(ReadByte((const char*)WW, i), i, ppPack);
          
         // std::string result(stream.str());
          
         std::string wwww = ToString(ppPack, i, 48);
            
      }
  </code></pre>
  <p>any Help ?</p>