I have a serious and irritating problem, please help
mdContext->digest[i]
is an unsigned char Array with hexadecimal values so
for (i = 0; i < 16; i++)
printf ("%02x", mdContext->digest[i]);
prints 900150983cd24fb0d6963f7d28e17f72
now.... I want to get this value in a char Array, i.e if I do
printf("%s",ArrayConverted);
I want to print the above string... Please help me in doing this
Things I tried
Trial-1
unsigned char in[64]=0;
int tempValue[64];
for (i = 0; i < 16; i++){
sprintf(&tempValue[i],"%02x", (unsigned char)mdContext->digest[i]);
in[i]=(unsigned char)tempValue[i];
}
printf("%s\n\n\n",in);
This prints
90593d4bd9372e77
But Original content is 900150983cd24fb0d6963f7d28e17f72
So it is skipping many characters in between... please help me converting this hexadecimal Char array in to a String