Bitcoin Forum
April 19, 2024, 10:53:49 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: base58 module up on the cheeseshop (python)  (Read 1184 times)
keis (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
June 15, 2013, 04:48:19 PM
 #1

Hi

I've seen many projects and created a few one of script myself where the variations of the same base58 encode/decode snippet is included. I took the liberty to package this up and added it to pypi so it's super easy to depend on it. As a added bonus I've added python3 support and made it usable as a command-line tool that behave similar to base64(1)

Cheers!

https://pypi.python.org/pypi/base58/
1713567229
Hero Member
*
Offline Offline

Posts: 1713567229

View Profile Personal Message (Offline)

Ignore
1713567229
Reply with quote  #2

1713567229
Report to moderator
"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713567229
Hero Member
*
Offline Offline

Posts: 1713567229

View Profile Personal Message (Offline)

Ignore
1713567229
Reply with quote  #2

1713567229
Report to moderator
1713567229
Hero Member
*
Offline Offline

Posts: 1713567229

View Profile Personal Message (Offline)

Ignore
1713567229
Reply with quote  #2

1713567229
Report to moderator
1713567229
Hero Member
*
Offline Offline

Posts: 1713567229

View Profile Personal Message (Offline)

Ignore
1713567229
Reply with quote  #2

1713567229
Report to moderator
eddlow
Newbie
*
Offline Offline

Activity: 52
Merit: 0


View Profile
May 09, 2014, 07:29:24 AM
 #2

Old post, but I reply anyway.

I just downloaded this package and tried to create a simple example to make sure I'm using it right. I took the RIPEMD-160 output from the Technical background for creating addresses and wrote this code:

Code:
import base58

data = "00010966776006953D5567439E5E39F86A0D273BEED61967F6"
print(base58.b58encode(data))
When run:
Code:
bSLesHPiFV9jKNeNbUiMyZGJm45zVSB8bSdogLWCmvs88wxHjEQituLz5daEGCrHE7R7

The Base58Check encoding should be "16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM", not the one above. So I tried this:

Code:
import base58

data = "00010966776006953D5567439E5E39F86A0D273BEED61967F6"
print(base58.b58encode_check(data))

When run:
Code:
4tLt7VRA9EvEYi3vrZSvS6ynpFmfLnFL4Ugx77ga4VPNFavt6T96TZxXwMrpGW2wj5gCWhkGYM

Does anyone know how to use this package correctly? Sadly, it lacks of instructions or a readme file.

Thanks.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!