title: Save integer array in hexadecimal format to a char "string"
body: <p>I have this code which generates an HMAC with a SHA384 hash. It uses <code>openssl</code>.</p>
  
  <pre><code>HMAC_CTX ctx;
  HMAC_CTX_init(&amp;ctx);
  
  HMAC_Init_ex(&amp;ctx, api_secret, (int)strlen(api_secret), EVP_sha384(), NULL);
  HMAC_Update(&amp;ctx, (unsigned char*)&amp;encoded_payload, strlen(encoded_payload));
  HMAC_Final(&amp;ctx, result, &amp;len);
  HMAC_CTX_cleanup(&amp;ctx);
  
  for (int i = 0; i != len; i++)
      printf("%02x", (unsigned int)result[i]);
  </code></pre>
  
  <p>So, as you can see, the hash is stored inside the <code>result</code> array. The <code>printf</code> loop is used to print each single unit in the array, converted to hexadecimal.</p>
  
  <p>I need to store the printed hexadecimal string in a <code>char</code> variable. How can i do this? Thanks in advance! </p>