MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / isValid

Method isValid

app/src/Licensing/CommercialToken.cpp:94–109  ·  view source on GitHub ↗

* @brief Checks whether this token was produced by a legitimate validation. */

Source from the content-addressed store, hash-verified

92 * @brief Checks whether this token was produced by a legitimate validation.
93 */
94bool 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

Callers 5

nowFlooredMethod · 0.45
readSettingsMethod · 0.45
onServerReplyMethod · 0.45
readSettingsMethod · 0.45

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected