Skip to main content

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

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 details)

Uploaded Source

File details

Details for the file base64u-1.0.tar.gz.

File metadata

  • Download URL: base64u-1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.2

File hashes

Hashes for base64u-1.0.tar.gz
Algorithm Hash digest
SHA256 30e87ae1edd52e670b977c161fc14ff207500574b56f66a470433e5ee81527bf
MD5 433f7f05cceb22b01fb5875d67be57eb
BLAKE2b-256 c354c294d89933eaeeb7d99441fda0ae9f9a71f348eaff738bfa927ccffb16e3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0 This release

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page