I have input
unsigned char hex[64] = 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a0"
and I want output like this:
unsigned char tmpInHash[32] = { 0x9f, 0x86, 0xd0, 0x81, 0x88, 0x4c, 0x7d, 0x65, 0x9a, 0x2f, 0xea, 0xa0, 0xc5, 0x5a, 0xd0, 0x15, 0xa3, 0xbf, 0x4f, 0x1b, 0x2b, 0x0b, 0x82, 0x2c, 0xd1, 0x5d, 0x6c, 0x15, 0xb0, 0xf0, 0x0a, 0x08 }
I searched for the answer everywhere, but the answers , which I found, do not fit.
EDIT
I want that when I write:
for(i=0; i< strlen(tmpInHash); i++ {
printf("%c ", tmpInHash);
}
I get this:
0x9f 0x86 0xd0 0x81 0x88 0x4c 0x7d 0x65 0x9a ...
Is it possible?