G
YouTube TikTok Games
Skip to content
p2p-todayPublic
forked from keis/base58

About

Base58 and Base58Check implementation compatible with what is used by the bitcoin network.

Resources

Stars

1 star

Watchers

1 watching

Forks

 
 

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

base58

PyPI Version PyPI Downloads Build Status Coverage Status

Base58 and Base58Check implementation compatible with what is used by the bitcoin network.

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')
'StV1DL6CwTryKyV'
>>> base58.b58decode(b'StV1DL6CwTryKyV')
b'hello world'
>>> base58.b58encode_check(b'hello world')
'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

About

Base58 and Base58Check implementation compatible with what is used by the bitcoin network.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages