Algorithms

HASH160

RIPEMD-160 of SHA-256. The key and script hash behind Bitcoin and Litecoin and Dogecoin and Zcash addresses
IDhash16015 / 24cryptographic · 160-bit
Hash / Cryptographic

HASH160

RIPEMD-160 of SHA-256, a public key becomes an address.

Digest
160-bit · 20 bytes
HMAC
no key mode
Security
80-bit collision resistance
Used by
Bitcoin, Litecoin, Dogecoin, Dash, Zcash, XRP Ledger
1 option, 0 required

Sample

hex
d7d5ee7824ff93f94c3055af9382c86c68b5ca92
base64
19XueCT/k/lMMFWvk4LIbGi1ypI=

Options

encodingstring
default hex
Output encoding: hex, base64, base64url, binary

Access

Createcreate("hash160")
CLIhashes hash160 'hello world'
Tryplayground with the sample above
Kinsha256, sha384, sha512, sha512-half +11

RIPEMD-160 over SHA-256. Every P2PKH, P2WPKH and P2SH address in Bitcoin and its forks carries one: Litecoin, Dogecoin, Dash, Bitcoin Cash, Zcash, and the XRP Ledger's account IDs as well.

ts
const key = Uint8Array.fromHex("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798");
create("hash160").hash(key).digest;
// "751e76e8199196d454941c45d1b3a323f1433bd6"

That's the compressed public key of private key 1, the secp256k1 generator itself. Its HASH160 is inside bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4, one of the test addresses everybody has seen. Hash the hex string instead of the bytes and you get b170e26b…, a digest of nothing that looks valid. The CLI and the tools take --input-encoding hex for this exact reason.

Composed, so no HMAC mode.