# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.mmdrza.com/guidelines/secp256k2/private-key-decimal-to-ripemd160-h160.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
