4.8 C
New York
Monday, November 25, 2024

How can I get better my non-public key?

Share To Your Friends

[ad_1]

I’ve part of an UNCOMPRESSED non-public key. Begins at 5, lacking 10 characters on the finish. I noticed the code on this discussion board and used it in python. However when working with my key, it offers out 2 incorrect choices. I feel the factor is that the code is written for a compressed key, since I checked on a compressed non-public key and it labored. What can I do?


import base58, sys

partial = sys.argv[1]

if len(partial) != 45:
    print("partial key ought to be 45 characters")
    sys.exit(1)

outcomes = {}
for c in '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz':
    wif = base58.b58encode_check(base58.b58decode(partial + c*7)[:33] + b'x01').decode('ascii')
    if wif[:45] == partial: outcomes[wif] = True

for okay in outcomes.keys(): print(okay)

[ad_2]


Share To Your Friends

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles