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:

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

Encrypt Data

Next, encrypt the following data:

{
  "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:

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.

Last updated