title: C++ Small char to hex function?
body: <p>I'm trying to find a very lightweight way to either hex a char or md5 one with two examples below.</p>
  
  <pre><code>char example[0x34];
  char example_final[0x200];
  sprintf(example, "%s", "4E964DCA5996E48827F62A4B7CCDF045");
  </code></pre>
  
  <p>For an example using two PHP functions below.</p>
  
  <p>MD5:</p>
  
  <pre><code>sprintf(example_final, "%s", md5(example));
  output: 149999b5b26e1fdeeb059dbe0b36c3cb
  </code></pre>
  
  <p>HEX:</p>
  
  <pre><code>sprintf(example_final, "%s", bin2hex(example));
  output: 3445393634444341353939364534383832374636324134423743434446303435
  </code></pre>
  
  <p>Which ever is the most lightweight way to do it. I was thinking some big array of char to it's hex value than making a loop foreach char, but unsure.</p>