Bitcoin Forum
December 11, 2017, 04:53:04 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Good reference for converting Bitcoin public key to address  (Read 376 times)
pilotniq
Jr. Member
*
Offline Offline

Activity: 31


View Profile
May 24, 2013, 08:37:49 AM
 #1

I was debugging some code to convert a bitcoin public key to an address, and had great use of this diagram posted by etothepi:

http://dl.dropbox.com/u/1139081/BitcoinImg/PubKeyToAddr.png
1512967984
Hero Member
*
Offline Offline

Posts: 1512967984

View Profile Personal Message (Offline)

Ignore
1512967984
Reply with quote  #2

1512967984
Report to moderator
1512967984
Hero Member
*
Offline Offline

Posts: 1512967984

View Profile Personal Message (Offline)

Ignore
1512967984
Reply with quote  #2

1512967984
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1512967984
Hero Member
*
Offline Offline

Posts: 1512967984

View Profile Personal Message (Offline)

Ignore
1512967984
Reply with quote  #2

1512967984
Report to moderator
1512967984
Hero Member
*
Offline Offline

Posts: 1512967984

View Profile Personal Message (Offline)

Ignore
1512967984
Reply with quote  #2

1512967984
Report to moderator
JahPowerBit
Sr. Member
****
Offline Offline

Activity: 296


Counterparty Developer


View Profile
May 24, 2013, 09:41:09 AM
 #2

Look at this code : https://github.com/weex/addrgen

you can do something like this:

pubkey = ".........".decode('hex')
hash160 = rhash(pubkey)
addr = base58_check_encode(hash160, self.version)

Je suis Charlie!
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!