I am trying to create privatkey
private String wizard(String input) {
ECKey address = createAddress(input.getBytes());
byte[] hash160 = RIPEMD160(SHA256(address.getPubKey()));
LegacyAddress legacyAddress = LegacyAddress.fromPubKeyHash(MainNetParams.get(), hash160);
return legacyAddress.toBase58()+" key "+address.getPrivateKeyAsWiF(MainNetParams.get());
}
get adress +private key
1BqQfcTuvW6enmrt9eYYBNdC3ekhkNMsTS key 5Jx5Uj29KvD72Yt3JmLQE9sSMc3nXQ5vTRV4ALZB351uyo2v7v9
everything works correctly. One line always gives the same address and key and if i put this key in blockchain.com i get this adress
but if i try to encrypt THE SAME STRING here
http://crypt-online.ru/crypts/sha256/ through SHA256 I get another privatKey
956324220c316c960c31329b6c4efbee4c30f648ed50606191e0807d9e28552a
which gives me in blockchain.com a completely different adress.
13F4b5umPPVem8YfTAEtbnexFkEwKVQrcU
but it must be the same key in different encoding...
what am I doing wrong in code?
maybe these addresses are somehow connected and I just don't understand how?
my entire code is here, if needed
https://bitcoin.stackexchange.com/questions/68064/how-to-get-compressed-public-key-with-eckeygrateful for any help.