Base58 Encode and Decode using Python

base58 module

  1. Install base58 module from the command line:
pip install base58
  1. Encode and decode data using Base58:
import base58

text = 'Hello'
base58Str = base58.b58encode(text.encode('utf-8')).decode('utf-8')
print(base58Str)

text = base58.b58decode(base58Str).decode('utf-8')
print(text)

Leave a Comment

Cancel reply

Your email address will not be published.