Create HMAC Signature | TEXT_HMAC
Syntax
TEXT_HMAC( [value], [secret], [encoding = "hex"], [algorithm = "sha256"] )
Parameters
value
The TEXT to generate the signature for.
If it is not a TEXT value, it will be set to an empty TEXT.
secret
The TEXT secret to generate the signature.
If it is not a TEXT value, it will be set to an empty TEXT.
encoding optional
The encoding for the output.
If not provided, the output will be encoded as hexadecimal.
Valid values are:
- hex
- base64
algorithm
The algorithm used to generate the signature.
If not provided, the sha256 algorithm will be used.
Valid values are:
- sha1
- sha224
- sha256
- sha384
- sha512
- ripemd160
Return Value
A TEXT in the specified ENCODING that is the calculated HMAC signature of VALUE.Description
Generate an HMAC signature.Examples
TEXT_HMAC("phrase to sign","secret key", "base64", "sha256")
# returns "wIFPqagr3E/oa4E2U0I3oNaiu6njTdesyCDasfg03N0="