Skip to main content

Base64u - URL-Safe Base64 variant no padding.

Project description

base64u

Base64u - URL-Safe Base64 variant no padding. Based on https://gist.github.com/jonleighton/958841

Also main part code was from https://github.com/greymass/eosio-signing-request/blob/ffe7458abb48c4fcd998d7c6b142cdd4c7d46cda/src/base64u.ts

Installation

pip install base64u

Usage

import base64u

data = base64u.Uint8Array(10) # like bytearray
encoded = base64u.encode(data)
decoded = base64u.decode(encoded)

print(encoded)
print(decoded)

# data is Uint8Array for assert equality bytearray and List[int]
assert data == [0]*10 
assert encoded == "AAAAAAAAAAAAAA"
assert decoded == data

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

base64u-1.0.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page