Bitcoin Forum
May 02, 2024, 11:54:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: convert 256 bit to WIF - compress  (Read 109 times)
stalker00075 (OP)
Newbie
*
Offline Offline

Activity: 54
Merit: 0


View Profile
May 10, 2022, 08:33:33 AM
 #1

this code

Code:
import os, binascii, hashlib, base58
fullkey = "80"+"7542FB6685F9FD8F37D56FAF62F0BB4563684A51539E4B26F0840DB361E0027C"
sha256a = hashlib.sha256(binascii.unhexlify(fullkey)).hexdigest()
sha256b = hashlib.sha256(binascii.unhexlify(sha256a)).hexdigest()
WIF = base58.b58encode(binascii.unhexlify(fullkey+sha256b[:8]))
print(WIF)


need "print " compress address pls help....
1714694046
Hero Member
*
Offline Offline

Posts: 1714694046

View Profile Personal Message (Offline)

Ignore
1714694046
Reply with quote  #2

1714694046
Report to moderator
1714694046
Hero Member
*
Offline Offline

Posts: 1714694046

View Profile Personal Message (Offline)

Ignore
1714694046
Reply with quote  #2

1714694046
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714694046
Hero Member
*
Offline Offline

Posts: 1714694046

View Profile Personal Message (Offline)

Ignore
1714694046
Reply with quote  #2

1714694046
Report to moderator
1714694046
Hero Member
*
Offline Offline

Posts: 1714694046

View Profile Personal Message (Offline)

Ignore
1714694046
Reply with quote  #2

1714694046
Report to moderator
stanner.austin
Member
**
Offline Offline

Activity: 67
Merit: 53


View Profile
May 10, 2022, 08:36:24 AM
Merited by ABCbits (2), BlackHatCoiner (2)
 #2

@stalker00075
For compressed just add 01 at end.
fullkey = "80"+"7542FB6685F9FD8F37D56FAF62F0BB4563684A51539E4B26F0840DB361E0027C" + "01"
Also i recommend use good python lib to do this not manually.
For example this one
https://ofek.dev/bit/
stalker00075 (OP)
Newbie
*
Offline Offline

Activity: 54
Merit: 0


View Profile
May 10, 2022, 08:39:51 AM
 #3

@stalker00075
For compressed just add 01 at end.
fullkey = "80"+"7542FB6685F9FD8F37D56FAF62F0BB4563684A51539E4B26F0840DB361E0027C" + "01"
Also i recommend use good python lib to do this not manually.
For example this one
https://ofek.dev/bit/


thank you very much!
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!