I used this link to create a SHA1 hash for any data using C++. But the output buffer from SHA1 call is an unsigned char*. I want to store the hexadecimal values i.e. the Message Digest values so that I can use them for other operations.
As those are unsigned char* it doesn't make sense in converting them to a string and then performing hexadecimal conversion. So I have to do the hex conversion and then store the values as a string or char*. How can I do this?
SHA1(ibuf, strlen(ibuf), obuf);
for (i = 0; i < 20; i++) {
printf("%02x ", obuf[i]);