---
title: "HASH160"
description: "RIPEMD-160 of SHA-256. The key and script hash behind Bitcoin and Litecoin and Dogecoin and Zcash addresses"
canonical_url: "https://hashes.agntn.dev/algorithms/hash160"
---
# HASH160

> RIPEMD-160 of SHA-256. The key and script hash behind Bitcoin and Litecoin and Dogecoin and Zcash addresses

<algorithm-facts name="hash160">



</algorithm-facts>

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.


## Sitemap

See the full [sitemap](https://hashes.agntn.dev/sitemap.md) for all pages.
