uint8_t array to hex in string

Hi All. I'm a newbie here and looking for help.

I'm trying to use AES to encrypt my sensor data before send it to my pc from arduino. And the result is come in uint8_t type. In my PC I've built AES decryptor but it only recognized hex string type to decrypt. :confused:

Does anyone know how to convert uint8_t to hex in string or char array in arduino? I've search and come to this thread which discuss the opposite (hex in string to uint8_t).

thank you


You can also do it with sprintf using the x formatter

sprintf(str,"%x",value); //converts to hexadecimal base.