# Encrypted Binary Data to hex encoded

**URL:** <https://community.glideapps.com/t/encrypted-binary-data-to-hex-encoded/70771>\
**Category:** Ask for Help\
**Created:** [February 13, 2024, 8:05am UTC](https://community.glideapps.com/t/encrypted-binary-data-to-hex-encoded/70771 "2024-02-13T08:05:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)\
**Post date:** [February 13, 2024, 8:05am UTC](https://community.glideapps.com/t/encrypted-binary-data-to-hex-encoded/70771/1 "2024-02-13T08:05:00Z")

</div>

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](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/0/701a4ed6ac109715df6a771bfb93fce851a5fb19.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 13, 2024, 11:45pm UTC](https://community.glideapps.com/t/encrypted-binary-data-to-hex-encoded/70771/2 "2024-02-13T23:45:28Z")

</div>

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

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

```

or

```auto
return p1.toString('hex');

```
