User Tools

Site Tools


syntax:functions:hmachex

HMACHex(algorithm, key, text)

Calculates a keyed hexadecimal hash of a given text value using one of the algorithms:

  • md5
  • sha1
  • sha256
  • sha384
  • sha512

The specified algorithm is used as a Hash-based Message Authentication Code (HMAC). The HMAC process mixes a secret key with the message data, hashes the result with the hash function, mixes that hash value with the secret key again, and then applies the hash function a second time.

Remarks: data types other than text are not converted into text automatically. All texts are assumed to have the UTF-8 encoding. The algorithm name is case-insensitive. The key and the value are case-sensitive.

Example:

Expression Result
hmachex(“md5”, “223jh4gj2h3g4”, “We're just two lost souls swimming in a fish bowl”) 9ab29e6486f1ff01d2cbb4238abc0320

See also

syntax/functions/hmachex.txt · Last modified: 2019/12/07 19:51 by dmitry