Encrypted Binary Data to hex encoded

We are getting encrypted Binary Data from scanning a drivers license, it needs to be converted into hex encoded data to send off in an API call. Does anyone know how to do this conversion?

A picture of the data:

Screenshot 2024-01-23 151020

I don’t have any experience with this, but here are suggestions from GPT-4.

return Array.prototype.map.call(new Uint8Array(p1), x => x.toString(16).padStart(2, '0')).join('');


return p1.toString('hex');