> For the complete documentation index, see [llms.txt](https://guide.mmdrza.com/guidelines/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.mmdrza.com/guidelines/secp256k2/private-key-decimal-to-ripemd160-h160.md).

# Private Key (decimal) To RIPEMD160 (h160)

```python
from secp256k2 import Contactor

cont = Contactor()

privatekey = 12345678901234567891234567891234567789

ripemd160 = cont.privatekey_to_h160(privatekey)
```

In the code snippet above, an instance of the `Contactor` class from the `secp256k2` library is created, which is a Python library that provides tools for working with Bitcoin's secp256k1 elliptic curve. A private key is defined as a long integer. Then, this private key is converted to a hash using the RIPEMD-160 algorithm by invoking the `privatekey_to_h160` method of the `Contactor` object. The output, `ripemd160`, represents the RIPEMD-160 hash of the given private key. This process is a part of generating a Bitcoin address from a private key, where RIPEMD-160 is one of the several steps involved in the creation of a wallet address.
