HMAC generation and comparison for cross application authentication