HmacSha256
The HmacSha256() function calculates a MAC (message authentication code) on provided message using the SHA256 hash function and a key/secret, and returns the calculated MAC as a hexadecimal text string.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Hashed values cannot be decoded, usually you check an incoming value against a known value that you hash yourself and check if both values are identical, to verify correctness without knowing the actual value.
Returns a hexadecimal text representation of a message, which is hashed using the Sha265 function and the key/secret for additional calculation/hashing.
Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.
Syntax
HmacSha256(key, message)
HmacSha256("", "")
=> "b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad"
HmacSha256("key", "The quick brown fox jumps over the lazy dog")
=> "f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8"
HmacSha256(key, message, returnasbase64)
HmacSha256("Secret Key", "testing the hmacsha265 converter", true)
=> "hhG+nxnGLS4pT5DVoMyP8VoNrpbnkNaK8e7g5COSb+A="
HmacSha256("Secret Key", "testing the hmacsha265 converter", false)
=> "8611be9f19c62d2e294f90d5a0cc8ff15a0dae96e790d68af1eee0e423926fe0"
Parameters
key
text
☑️
a text with the secret key for HmacSha256 encryption
message
text
☑️
the message or content
returnbase64
yes/no
return result as base64 (if true)
Last updated
Was this helpful?