* @brief Checks whether this token was produced by a legitimate validation. */
| 92 | * @brief Checks whether this token was produced by a legitimate validation. |
| 93 | */ |
| 94 | bool Licensing::CommercialToken::isValid() const |
| 95 | { |
| 96 | if (m_tier == FeatureTier::None) |
| 97 | return false; |
| 98 | |
| 99 | if (m_variantName.isEmpty()) |
| 100 | return false; |
| 101 | |
| 102 | if (m_instanceName.isEmpty()) |
| 103 | return false; |
| 104 | |
| 105 | if (m_hmac == 0) |
| 106 | return false; |
| 107 | |
| 108 | return m_hmac == computeHmac(); |
| 109 | } |
| 110 | |
| 111 | //-------------------------------------------------------------------------------------------------- |
| 112 | // Field accessors |
no test coverage detected