My problem is converting array of chars to array of hexadecimal numbers, i need to take 2chars from char array and conver them into one hex number.
This is my input:
unsigned char text [1024]= "06fb7405eba8d9e94fb1f28f0dd21fdec55fd54750ee84d95ecccf2b1b48";
This is what i need:
unsigned char hexval[1024] = {0x06, 0xfb, 0x74, 0x05, 0xeb, 0xa8, 0xd9, 0xe9, 0x4f, 0xb1, 0xf2, 0x8f, 0x0d, 0xd2, 0x1f, 0xde, 0xc5, 0x5f, 0xd5, 0x47, 0x50, 0xee, 0x84, 0xd9, 0x5e, 0xcc, 0xcf, 0x2b, 0x1b, 0x48};
I found function sscanf()
that could solve my problem but i dont know how to properly use it onmy input array.
How can I achive this conversion ?