Jak wydrukować unsigned char [] jako HEX w C ++?

Chciałbym wydrukować następujące dane mieszane. Jak mam to zrobić?

<code>unsigned char hashedChars[32];
SHA256((const unsigned char*)data.c_str(),
       data.length(), 
       hashedChars);
printf("hashedChars: %X\n", hashedChars);  // doesn't seem to work??
</code>

questionAnswers(1)

yourAnswerToTheQuestion