Java: way to convert a 256-bit private key to WIF?

Java: way to convert a 256-bit private key to WIF?

I have a question concerning Java and sha-256.

I try to do these steps discribed here to create a WIF key: http://ift.tt/1l34kba

  1. step:

String string = "0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D";

  1. step (ad 80 in front):

string = "80" + string;

  1. perform sha-256:
    • here is my mistake. I can perform sha-256 on step 2 but the result is wrong. The reason seems to be perform the hash on a String and not on binary. I get:

e2e4146a36e9c455cf95a4f259f162c353cd419cc3fd0e69ae36d7d1b6cd2c09

But I should get:

8147786C4D15106333BF278D71DADAF1079EF2D2440A4DDE37D747DED5403592

I dont get how to convert it to binary. Can someone help me?

Its the same problem as here (Correct way to convert a 256-bit private key to WIF?) but I dont understand the answer. I also cant reply to the thread because I dont have enough reputation.

Thank you :)

http://ift.tt/2ABk3iy

Comments

Popular posts from this blog

Antminer D3 Blissz Modified Firmware For Improved Performance

ETH To The Moon / Bank of England Cryptocurrency? / BTC Dominance / More (The Crypt0 Minute)