hmac - Liquid Filter Reference
On this page
Description
Converts a string into an encrypted hash using a hash message authentication code (HMAC).
| Property | Value |
|---|---|
| Return Type | string |
| Category | text |
Options
| Option | Description |
|---|---|
algorithm |
Specifies the algorithm to use for the HMAC. The default is SHA1. Options are SHA1, SHA256, SHA384, SHA512, MD5. |
Examples
liquid
{{ "Hello World" | hmac: "secret_key" }}
Output: 3fccbb2a2682817133576387047f3557f22c8f0d
liquid
{{ nil | hmac: "secret_key" }}
Output: ``