Parameterizing hmac algorithm and encoding