data using the key key with the underlying algo used for compression.
Parameters
Returns
string
The HMAC of the data.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
function computeHmac(
algorithm,
_key,
_data): string
data using the key key with the underlying algo used for compression.
string
The HMAC of the data.
key = id('some-secret');
// Compute the HMAC
computeHmac('sha256', key, '0x1337');
// To compute the HMAC of UTF-8 data, the data must be
// converted to UTF-8 bytes
computeHmac('sha256', key, toUtf8Bytes('Hello World'));
Was this page helpful?
