cleanup hmac algorithm lookup and some (un)related test stuff