I have a question concerning Java and sha-256.
I try to do these steps discribed here to create a WIF key: https://en.bitcoin.it/wiki/Wallet_import_format
String string = "0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D";
- step (ad 80 in front):
string = "80" + string;
- 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:
But I should get:
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 :)