Rewrite HMAC as module