Does anyone know of a library that provides a function that performs this logic or perhaps a method to perform this logic?
I'm trying to convert:
unsigned char test[] = "\x00\x00\x56\x4b\x7c\x8a\xc5\xde";
to:
94882212005342 / 0x0000564b7c8ac5de
I'm aware I could loop over each individual byte in test
and utilize sprintf
to convert each byte to string and concatenate them into a buffer with strcat
and convert the buffer string to unsigned long long
via strtoull
. However I'm looking for something more comprehensive and simple. Is there such a way?