Base64 to Hexadecimal Converter
Project description
Base64 to Hexadecimal Converter
Converts strings in Base64 to Hexadecimal inside JSON files.
Example
Consider the following JSON file called data.json
.
{
"mostRecentMachineHash": {
"data": "BAAAhWHqhD6t35WDLbQjCNThk04glwBqEGfmh27rkoA="
},
"mostRecentVouchersEpochRootHash": {
"data": "XhaRbdkr3XQD9FDIl/N8MDNG7z9LrT8YmigcNvqWnMY="
},
"mostRecentNoticesEpochRootHash": {
"data": "WJfJG6VyF4ndZkW5Z8/UGfd8ALPov88EcFpOyu1wZ9Q="
},
"processedInputs": [
{
"mostRecentMachineHash": {
"data": "VT/WlH6kqOvLt7/e3gOrAQriU7Lgq8QtZD0yh4jeAjc="
},
"voucherHashesInEpoch": {
"targetHash": {
"data": "S0oviQGm0hoFsu01ead/1odUJQO8b09Q5ZGBa6E0wEM="
},
"rootHash": {
"data": "XhaRbdkr3XQD9FDIl/N8MDNG7z9LrT8YmigcNvqWnMY="
}
},
"reports": [
{
"payload": "jcIadw=="
}
]
}
]
}
If we run python -m b64to16 data.json
, we get the following output.
{
"mostRecentMachineHash": {
"data": "0x0400008561ea843eaddf95832db42308d4e1934e2097006a1067e6876eeb9280"
},
"mostRecentVouchersEpochRootHash": {
"data": "0x5e16916dd92bdd7403f450c897f37c303346ef3f4bad3f189a281c36fa969cc6"
},
"mostRecentNoticesEpochRootHash": {
"data": "0x5897c91ba5721789dd6645b967cfd419f77c00b3e8bfcf04705a4ecaed7067d4"
},
"processedInputs": [
{
"mostRecentMachineHash": {
"data": "0x553fd6947ea4a8ebcbb7bfdede03ab010ae253b2e0abc42d643d328788de0237"
},
"voucherHashesInEpoch": {
"targetHash": {
"data": "0x4b4a2f8901a6d21a05b2ed3579a77fd687542503bc6f4f50e591816ba134c043"
},
"rootHash": {
"data": "0x5e16916dd92bdd7403f450c897f37c303346ef3f4bad3f189a281c36fa969cc6"
}
},
"reports": [
{
"payload": "0x8dc21a77"
}
]
}
]
}
We can also stream the JSON input through standard input, like cat data.json | python -m b64to16
.
Help
Run python -m b64to16 -h
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file base64-to-hex-converter-0.4.1.tar.gz
.
File metadata
- Download URL: base64-to-hex-converter-0.4.1.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69a066f8fc1ebff91c08052646b9553b534b9d195bf18105e1e3f5eba7b8324d |
|
MD5 | 1db1cd3c6c4326754d23bf06e65a9901 |
|
BLAKE2b-256 | a8347518369cc3b211a3253c0be5180641789af12e487d78666402a462118d7c |
File details
Details for the file base64_to_hex_converter-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: base64_to_hex_converter-0.4.1-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ffb69365db43e14de761b43c4ca14bc1bff732c845d056004487fc09aa781f8 |
|
MD5 | ca712b83bdae3692c74523a70f374197 |
|
BLAKE2b-256 | b5155ba12fd85f1e0f11c06d9583a5b4ca021ce0781563ca4264ba9c54c4117a |