Added HMAC logic