Updated HMAC algorithm