I have a dumb question about Hash160 (specifically, going from a public key to Hash160).
If I take a public key: 04ce0ed35340803b0c21f2f7f5d5ab9d687e5fa95a79471c9b5c9d97a0bb170eac1045230cc51d13b85a5f64feb80f8fc19358a396797926e3f89d49066b1abc07
and I run it through a hash160 calculator (https://www.btcschools.net/bitcoin/bitcoin_tool_hash160.php), I get a Hash160 of: 1558c7cd9825447a31990ff964f347bb2dbfe9be
This is the correct Hash160 (according to other trusted sources).
I'm trying to go through the Hash160 steps manually (just to learn). My understanding is that Hash160 is just running the public key through SHA256, and then running that output through RIPEMD160. However, when I try to recreate the correct Hash160 output by running that public key through SHA256 and then RIPEMD160 (say, using online calculators, although I've tried on other calculators and via python so I could control binary/hex encoding), I get a SHA256 output of: a5d0a142f10031f9e2d3f806f4845005cd5b3b2722c335d5a352c268a0ee1ec9. Then, when I run that through RIPEMD160, I get other outputs (depending on what is going into the RIPEMD, like if it's hex or binary or whatever).
But none of them are the Hash160 output I was expecting. I'm guessing there's some step I'm missing... do I need to do anything to the public key first? Or do something after running it through SHA256 or RIPEMD160 or something?
Just really at a loss as to why literally every source I can find says that Hash160 is just RIPEMD160(SHA256( publicKey )) but that path doesn't seem to work when attempting to do this manually.
I found this post (OP_HASH160: Computing script hash in a concrete P2SH transaction) but I've tried all of the binary and hex permutations via the python hashlib that I could think of (tried all binary in, all hash in, some hash in some binary in, etc.)
Any help would be amazing, thanks!!