Base58check encoding and decoding of binary data
Project description
Maintainer
Joe Black | me@joeblack.nyc | github
Introduction
A python implementation of the Base58Check encoding scheme.
The Base58Check encoding scheme is a modified Base 58 binary-to-text encoding. More generically, Base58Check encoding is used for encoding byte arrays in Bitcoin into human-typable strings.
PLEASE NOTE: For consistency with encoding schemes in python, encode inputs must be bytes and will be enforced. Use .encode('ascii') on text input to encode to bytes.
Installation
pip3 install base58check
Usage
>>> import base58check
encoding
>>> base58check.b58encode(b'1BoatSLRHtKNngkdXEeobR76b53LETtpyT')
b'\x00v\x80\xad\xec\x8e\xab\xca\xba\xc6v\xbe\x9e\x83\x85J\xde\x0b\xd2,\xdb\x0b\xb9`\xde'
decoding (input can be text or bytes here)
>>> base58check.b58decode('\x00v\x80\xad\xec\x8e\xab\xca\xba\xc6v\xbe\x9e\x83\x85J\xde\x0b\xd2,\xdb\x0b\xb9`\xde')
b'1BoatSLRHtKNngkdXEeobR76b53LETtpyT'
Changes
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
base58check-1.0.1.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for base58check-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0510375017e5f7bb0a25d560b20a52881ee49240b4ae6ad9090e6377444c3851 |
|
MD5 | 45ee74b792b89a2ff22708863a6ca8ea |
|
BLAKE2b-256 | 0300443ef995009812d81bc324185521c7ec510bb771e144e58502e73f36c959 |