HMAC in Zola?

Zola has get_hash, which make SRI possible, along with just being a useful, general building block. Would @keats be receptive to adding get_hmac(key, msg, hash, base64) to Zola?


<!-- 8f16771f9f8851b26f4d460fa17de93e2711c7e51337cb8a608a0f81e1c1b6ae -->
{{ get_hmac(key="123", msg="abc", hash=256, base64=false) }}

HMAC is useful if you need to sign data that will be made public. I tried and it can’t be implemented as a macro (there’s no XOR for one thing). Additionally a hash in combination with a secret is not a substitute for this task, as it’s vulnerable to different attacks that allow forged messages to result in the same signature.

I can submit a PR if the proposal’s accepted, when I have time.