crypto.hmac_sha256

crypto.hmac_sha256

crypto.hmac_sha256

Function

Generate an HMAC-SHA256 signature of the current text using the key.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
keyStringYesNoneHMAC key.

Return value

TypeDescription
StringHMAC-SHA256 lowercase hexadecimal signature.

Code Example

Notes

  • Both text and keys participate in the calculation as UTF-8 bytes.