Hashing

This guide covers how to use the Crypto API's hashing function to generate HMAC (Hash-based Message Authentication Code) hashes for data integrity and security

Hashing

This guide covers how to use the Crypto API's hashing function to generate HMAC (Hash-based Message Authentication Code) hashes for data integrity and security.

In this guide, you’ll find:

  • An overview of the HMAC hashing process
  • Instructions for performing HMAC hashing with the Crypto API
  • A practical request example for implementation

Overview

The Crypto API's hashing function allows for the generation of HMAC (Hash-based Message Authentication Code) hashes of your data. This cryptographic operation ensures data integrity and authenticity by producing a fixed-size string (the hash), which is unique to the input data. HMAC hashing combines the hash function with a secret cryptographic key, adding an additional layer of security.

How to Perform HMAC Hashing

To hash your data using HMAC, send a POST request with your data payload and specify the operation as "hash". You will need to include your API token for authentication.

Request Example:

POST /dispatch HTTP/1.1
Host: localhost:9200
Request-ID: YOUR_REQUEST_ID
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
  "dispatch": {
    "operation": "hash"
  },
  "payload": "hash me please"
}


Did this page help you?
Priority Technology Holdings Logo