-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconvert.py
More file actions
6 lines (5 loc) · 724 Bytes
/
convert.py
File metadata and controls
6 lines (5 loc) · 724 Bytes
1
2
3
4
5
6
import base64
hex_data = "21926ef45cd1acf8f8466fb28b71339de9221e019a4890ba0fe63da5f9d1150ed2a1002abbbad5e0461a042841c9912eeb202ee491536efd0d4a340d16769796cd960f3a10f97f50d4a98bbea4cedef36bc8cf1722dd36c51c4ba857a9145b61a5dd14598ab496655ea645b5cd8503aeac2bd0a35521722aac9b8e71dca4e272a621d650cd4a5553ddc4391f600939f08c4ef4ff6f5aa72237636ca2d03df8c1b44b7a48850303db53b9a2a894b52537e941ce21e977564f33f7333bbb07933d2536e7cdb0343048b194b53bfcacadcc18a95b83907ba9ed731153e26b1d30ca3e7feb2505881f3ec1cece8a2deea2258340e0d424fb76116fa256d42be5100e"
bytes_data = bytes.fromhex(hex_data) # Convert hex to bytes
base64_data = base64.b64encode(bytes_data) # Encode these bytes in base64
print(base64_data.decode()) # Print as string