How to convert char string of Hex characters to unsigned char string of binary data
I am trying to convert a hexadecimal character array to a binary string (unsigned char) that I can use in crypto functions using Cryptlib or OpenSSL. Basically I have a Hex representation of a key like (02726d40f378e716981c4321d60ba3a3) which as a character string is 32 characters but as a binary string should be 16 bytes.
The character string is being read in from a file, how can I convert it to its binary representation as an unsigned char array?
Thanks.