btc地址生成

btc地址生成

Get you public key
Perform Sha256 on your Public key
Perform RIPEMD160 hashing on the result of Sha256 hash
Add version byte in front of RIPEMD160 hash (0x00 for main net, 0x6f for testnet)
Perform Sha256 hash on the extended RIPEMD160 hash
Perform Sha256 hash on the result of the previous step
Take the first 4 byte of the second Sha256 result, it’s the checksum
Add 4 bytes of checksum in previous step, at the end of RIPEMD160 hash of step 4 (This is 25-byte bitcoin address)
Convert the result from byte string to base58 string

Resource