I have extracted a MAC address into a char* array such that each section of the array is a pair of char values.
mac[0] = "a1"
mac[1] = "b2"
...
mac[5] = "f6"
Basically I need to take the char arrays and convert them to an unsigned char such that the hex representation is the same as the original char values.
a1 in ascii -> 0xa1
What is the best way to convert char* to hex in C?
My C isn’t the best, but this works using strtol(start, [stop], base)