Skip to main content
Version: 3.x

Create Secure HMAC

In the following section, you will see a diagram of the cryptographic operations performed when calling the method createSecureHmac

This method performs several cryptographic operations, including generating a salt, deriving a secure key using HKDF with the sha3-256 hashing algorithm, creating an HMAC, and returning the concatenated salt and HMAC result. The diagram will illustrate these steps clearly.

Input Data: data

Generate Master Key from Options

Generate Random Salt: 16 bytes

Use HKDF with sha3-256, Master Key, and Salt

Generate Secure Key: 64 bytes

Create HMAC with sha3-256, Secure Key, and Data

Concatenate Salt and HMAC

Return Combined Buffer: Salt + HMAC