Creates a keyed-hash message authentication code (HMAC), which can be used to verify authenticity and integrity of a message by two parties that share the key.
hmac(message, key [, algorithm] [, encoding] )
returns string
Name | Type | Required | Default | Description | Values | |
---|---|---|---|---|---|---|
message | any | Yes | The message or data to authenticate. This can be a String or a byte array. | |||
key | any | Yes | The secret key. The key can be a String or byte array. | |||
algorithm | string | No | HMACMD5 | An algorithm supported by the java crypto provider. | /Users/garethedwards/development/github/cfdocs/docs/functions/hmac.md | HMACSHA512 |
encoding | string | No | utf-8 | The character encoding to use when converting the message to bytes. Must be a character encoding name recognized by the Java runtime. | /Users/garethedwards/development/github/cfdocs/docs/functions/hmac.md | utf-16 |
hmac("msg", "secret", "HMACSHA256")