Skip to content
forked from keis/base58

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

License

Notifications You must be signed in to change notification settings

priestc/Groestlbase58

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Groestlbase58

PyPI Version PyPI Downloads

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

Command line usage

$ printf "hello world" | groestlbase58
StV1DL6CwTryKyV

$ printf "hello world" | groestlbase58 -c
3vQB7B6MrGQZaxCuFg4oh

$ printf "3vQB7B6MrGQZaxCuFg4oh" | groestlbase58 -dc
hello world

$ printf "4vQB7B6MrGQZaxCuFg4oh" | groestlbase58 -dc
Invalid checksum

Module usage

>>> import groestlbase58
>>> groestlbase58.b58encode(b'hello world')
'StV1DL6CwTryKyV'
>>> groestlbase58.b58decode(b'StV1DL6CwTryKyV')
b'hello world'
>>> groestlbase58.b58encode_check(b'hello world')
'3vQB7B6MrGQZaxCuFg4oh'
>>> groestlbase58.b58decode_check(b'3vQB7B6MrGQZaxCuFg4oh')
b'hello world'
>>> groestlbase58.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 Groestlcoin network.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%