Last updated:
0 purchases
cb58ref 0.2.0
cb58ref
cb58ref is a reference implementation of the CB58 encoding used by AVA.
CB58 is similar to the Base58Check encoding used in Bitcoin
both can encode arbitrary an arbitrary byte sequence
both use the same alphabet
both append a 4 byte checksum
they differ in the following respects
CB58 uses the final 4 bytes of SHA256(msg) as the checksum.
Base58Check uses the first 4 bytes of SHA256(SHA256(msg)) as the
checksum.
Usage
>>> import cb58ref
>>> cb58ref.cb58encode(b"Hello world"):
'32UWxgjUJd9s6Kyvxjj1u'
>>> cb58ref.cb58decode('32UWxgjUJd9s6Kyvxjj1u')
b"Hello world"
$ printf "Hello world" | python3 -m cb58ref
32UWxgjUJd9s6Kyvxjj1u
$ printf "32UWxgjUJd9s6Kyvxjj1u" | python3 -m cb58ref -d
Hello world
Installation
$ python3 -m pip install cb58ref
License
Free software: MIT license
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
The b58decode(), and b58encode() functions are from base58.py, part of Bitcoin Core.
History
0.2.0 (2020-06-17)
Command line interface
Type hints
Unit tests
0.1.0 (2020-06-15)
First release on PyPI.
Derived from https://github.com/bitcoin/bitcoin/blob/195822f1e05e2f36002c906667d4c639663f23b5/contrib/testgen/base58.py
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.