Name | base58 JSON |
Version |
2.1.1
JSON |
| download |
home_page | https://github.com/keis/base58 |
Summary | Base58 and Base58Check implementation. |
upload_time | 2021-10-30 22:12:17 |
maintainer | |
docs_url | None |
author | David Keijser |
requires_python | >=3.5 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# base58
[![PyPI Version][pypi-image]](https://pypi.python.org/pypi?name=base58&:action=display)
[![PyPI Downloads][pypi-downloads-image]](https://pypi.python.org/pypi?name=base58&:action=display)
[![Build Status][travis-image]](https://travis-ci.org/keis/base58)
[![Coverage Status][coveralls-image]](https://coveralls.io/r/keis/base58?branch=master)
Base58 and Base58Check implementation compatible with what is used by the
bitcoin network. Any other alternative alphabet (like the XRP one) can be used.
Starting from version 2.0.0 **python2 is no longer supported** the 1.x series
will remain supported but no new features will be added.
## Command line usage
$ printf "hello world" | base58
StV1DL6CwTryKyV
$ printf "hello world" | base58 -c
3vQB7B6MrGQZaxCuFg4oh
$ printf "3vQB7B6MrGQZaxCuFg4oh" | base58 -dc
hello world
$ printf "4vQB7B6MrGQZaxCuFg4oh" | base58 -dc
Invalid checksum
## Module usage
>>> import base58
>>> base58.b58encode(b'hello world')
b'StV1DL6CwTryKyV'
>>> base58.b58decode(b'StV1DL6CwTryKyV')
b'hello world'
>>> base58.b58encode_check(b'hello world')
b'3vQB7B6MrGQZaxCuFg4oh'
>>> base58.b58decode_check(b'3vQB7B6MrGQZaxCuFg4oh')
b'hello world'
>>> base58.b58decode_check(b'4vQB7B6MrGQZaxCuFg4oh')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "base58.py", line 89, in b58decode_check
raise ValueError("Invalid checksum")
ValueError: Invalid checksum
# Use another alphabet. Here, using the built-in XRP/Ripple alphabet.
# RIPPLE_ALPHABET is provided as an option for compatibility with existing code
# It is recommended to use XRP_ALPHABET instead
>>> base58.b58encode(b'hello world', alphabet=base58.XRP_ALPHABET)
b'StVrDLaUATiyKyV'
>>> base58.b58decode(b'StVrDLaUATiyKyV', alphabet=base58.XRP_ALPHABET)
b'hello world'
[pypi-image]: https://img.shields.io/pypi/v/base58.svg?style=flat
[pypi-downloads-image]: https://img.shields.io/pypi/dm/base58.svg?style=flat
[travis-image]: https://img.shields.io/travis/keis/base58.svg?style=flat
[coveralls-image]: https://img.shields.io/coveralls/keis/base58.svg?style=flat
Raw data
{
"_id": null,
"home_page": "https://github.com/keis/base58",
"name": "base58",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "",
"author": "David Keijser",
"author_email": "keijser@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7f/45/8ae61209bb9015f516102fa559a2914178da1d5868428bd86a1b4421141d/base58-2.1.1.tar.gz",
"platform": "",
"description": "# base58\n\n[![PyPI Version][pypi-image]](https://pypi.python.org/pypi?name=base58&:action=display)\n[![PyPI Downloads][pypi-downloads-image]](https://pypi.python.org/pypi?name=base58&:action=display)\n[![Build Status][travis-image]](https://travis-ci.org/keis/base58)\n[![Coverage Status][coveralls-image]](https://coveralls.io/r/keis/base58?branch=master)\n\nBase58 and Base58Check implementation compatible with what is used by the\nbitcoin network. Any other alternative alphabet (like the XRP one) can be used.\n\nStarting from version 2.0.0 **python2 is no longer supported** the 1.x series\nwill remain supported but no new features will be added.\n\n\n## Command line usage\n\n $ printf \"hello world\" | base58\n StV1DL6CwTryKyV\n\n $ printf \"hello world\" | base58 -c\n 3vQB7B6MrGQZaxCuFg4oh\n\n $ printf \"3vQB7B6MrGQZaxCuFg4oh\" | base58 -dc\n hello world\n\n $ printf \"4vQB7B6MrGQZaxCuFg4oh\" | base58 -dc\n Invalid checksum\n\n\n## Module usage\n\n >>> import base58\n >>> base58.b58encode(b'hello world')\n b'StV1DL6CwTryKyV'\n >>> base58.b58decode(b'StV1DL6CwTryKyV')\n b'hello world'\n >>> base58.b58encode_check(b'hello world')\n b'3vQB7B6MrGQZaxCuFg4oh'\n >>> base58.b58decode_check(b'3vQB7B6MrGQZaxCuFg4oh')\n b'hello world'\n >>> base58.b58decode_check(b'4vQB7B6MrGQZaxCuFg4oh')\n Traceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"base58.py\", line 89, in b58decode_check\n raise ValueError(\"Invalid checksum\")\n ValueError: Invalid checksum\n # Use another alphabet. Here, using the built-in XRP/Ripple alphabet.\n # RIPPLE_ALPHABET is provided as an option for compatibility with existing code\n # It is recommended to use XRP_ALPHABET instead\n >>> base58.b58encode(b'hello world', alphabet=base58.XRP_ALPHABET)\n b'StVrDLaUATiyKyV'\n >>> base58.b58decode(b'StVrDLaUATiyKyV', alphabet=base58.XRP_ALPHABET)\n b'hello world'\n\n\n[pypi-image]: https://img.shields.io/pypi/v/base58.svg?style=flat\n[pypi-downloads-image]: https://img.shields.io/pypi/dm/base58.svg?style=flat\n[travis-image]: https://img.shields.io/travis/keis/base58.svg?style=flat\n[coveralls-image]: https://img.shields.io/coveralls/keis/base58.svg?style=flat\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Base58 and Base58Check implementation.",
"version": "2.1.1",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "efa8296310fcf7b1b35e88bb31dfaf33",
"sha256": "11a36f4d3ce51dfc1043f3218591ac4eb1ceb172919cebe05b52a5bcc8d245c2"
},
"downloads": -1,
"filename": "base58-2.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "efa8296310fcf7b1b35e88bb31dfaf33",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 5621,
"upload_time": "2021-10-30T22:12:16",
"upload_time_iso_8601": "2021-10-30T22:12:16.658163Z",
"url": "https://files.pythonhosted.org/packages/4a/45/ec96b29162a402fc4c1c5512d114d7b3787b9d1c2ec241d9568b4816ee23/base58-2.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "3595b886f6d57b947fa8d38d4c92e5b3",
"sha256": "c5d0cb3f5b6e81e8e35da5754388ddcc6d0d14b6c6a132cb93d69ed580a7278c"
},
"downloads": -1,
"filename": "base58-2.1.1.tar.gz",
"has_sig": false,
"md5_digest": "3595b886f6d57b947fa8d38d4c92e5b3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 6528,
"upload_time": "2021-10-30T22:12:17",
"upload_time_iso_8601": "2021-10-30T22:12:17.858175Z",
"url": "https://files.pythonhosted.org/packages/7f/45/8ae61209bb9015f516102fa559a2914178da1d5868428bd86a1b4421141d/base58-2.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2021-10-30 22:12:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "keis",
"github_project": "base58",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "base58"
}