I need to convert large bit string like this :
unsigned char* key = "0111010111010101010101010100101011010";
to hexadecimal strings like this :
unsigned char* string = EBAAAA95A;
The problem is that my keys are usually longer than 50 or 60 bits, and when I try to convert them with strtoll(key, NULL, 2), the returned number is far bigger than what a long long int can even hold. Is there an efficiant way to convert this into hexadecimal directly ?
Thanks a lot for your help !