hmac_ sha1
string | hmac_sha1: string
returns string
Converts a string into an SHA-1 hash using a hash message authentication code (HMAC).
The secret key for the message is supplied as a parameter to the filter.
{%- assign secret_potion = 'Polyjuice' | hmac_sha1: 'Polina' -%}
My secret potion: {{ secret_potion }}
{%- assign secret_potion = 'Polyjuice' | hmac_sha1: 'Polina' -%}
My secret potion: {{ secret_potion }}
Output
My secret potion: 63304203b005ea4bc80546f1c6fdfe252d2062b2
Was this page helpful?