Function “sha256HMACOf”

function sha256HMACOf(data, key)

Computes the SHA-256 HMAC of the given string and key.

Parameters

NameTypeDescription
datastringThe data for which to compute the HMAC
keystringThe string to use for computing the HMAC

Return Value

Returns the 256-bit HMAC value encoded as a hex string.