# Data Preparation and Encryption

In this section, we'll go through the process of preparing your data for secure transmission using our API. This involves encrypting your data and then hashing it using HMAC SHA512 with base64 encoding.

**Prepare Data**

Start by preparing the following data structure:

```json
{
"merchant_id" = "a4263-e3d51-e7678-ae495",
"key" = "51243561425654564564564564564564564564"
}
```

**Encrypt Data**

Next, encrypt the following data:

```json
{
  "coin_type": "bitcoin",
  "usd_price": 1000.01,
  "timestamp": 1573578048
}
```

**Hashing Step**

1. **HMAC SHA512 Hashing**: Use your 'key' to hash the encrypted data using HMAC SHA512.
2. **Base64 Encoding**: Encode the hash in base64.

Example output hash:

```html
Use HMAC sha512 with key to hash the above data with base64.
Hash "i2lNBV67YTtTS7hgLYNkNGYIGqZNqPHfYGVnj5Emb7emZ+c6KOwLJtpVfU2eN41zkSB9zAfuCtIHfkLj5TInIw=="
```

This hash represents your secured data, ready for transmission through our API.

<br>


---

# 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://hyperhashing.gitbook.io/hyperhashing-api/data-preparation-and-encryption.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.
