Hi,
Code:static char *tohex (const unsigned char *digest, int len) {
int i;
static char dest[64];
for(i = 0; i < len; i++){
strcat (dest, &digest[i]);
//printf("%02x", digest[i]);
}
dest[0] = '\0';
//printf("\n");
return dest;
}
i am using md5. When i get md5 hash, i want it to be a hex value in order to use the digest in another function. But couldn't do it. Am i suppose to use sprintf instead? Why i am having a problem with strcat?
Thank you.