added
March 23, 2023 - Added hmac_sha256 Liquid Filter
over 1 year ago by Teachable
We've added an hmac_sha256
Liquid filter. In addition to our current Liquid filters, you will now be able to convert a string into an SHA-256 hash, using a hash message authentication code (HMAC). The filter takes in a string followed by a secret key as a parameter.
string | hmac_sha256: string
returns string
{%- assign secret_message = 'foo' | hmac_sha256: 'secret' -%}
My message is {{ secret_message }}
Output: My message is 773ba44693c7553d6ee20f61ea5d2757a9a4f4a44d2841ae4e95b52e4cd62db4
Learn more about how to use Liquid on Teachable.