KEYZY C++ Client Library 1.10.2
To develop software that is compiled with a C++ compiler and utilizes the KEYZY service (www.keyzy.io)
Loading...
Searching...
No Matches
Keyzy::ProductData Struct Reference

Your product's identity and credentials; construct one and pass it to KeyzyLicenseActivator to authenticate with the KEYZY service. More...

#include <KeyzyTypes.h>

Public Member Functions

 ProductData ()
 Creates an empty ProductData. Fill in the members before use.
 ProductData (std::string appId, std::string apiKey, std::string productCode, std::string cryptionKey, bool useHostIdInOfflineActivation=true, HostIdScheme hostIdScheme=HostIdScheme::V2)
 Creates the product identity used to authenticate with the KEYZY service.

Public Attributes

std::string _appId
std::string _apiKey
std::string _productCode
std::string _cryptionKey
bool _useHostIdInOffilneActivation
HostIdScheme _hostIdScheme

Detailed Description

Your product's identity and credentials; construct one and pass it to KeyzyLicenseActivator to authenticate with the KEYZY service.

Warning
Upgrading a product released on an SDK version before 1.10.0: keep HostIdScheme::V2 (the default) and call KeyzyLicenseActivator::migrateHostIdV1toV2() on every start, so existing activations move to V2 without user input. Without it, every device's host_id changes and all existing activations must re-activate. A product sold with offline licenses stays on HostIdScheme::V1.

Constructor & Destructor Documentation

◆ ProductData() [1/2]

Keyzy::ProductData::ProductData ( )
inline

Creates an empty ProductData. Fill in the members before use.

Warning
Upgrading a product released on an SDK version before 1.10.0: keep _hostIdScheme at HostIdScheme::V2 and call KeyzyLicenseActivator::migrateHostIdV1toV2() on every start; without it, all existing activations must re-activate. A product sold with offline licenses stays on HostIdScheme::V1.

◆ ProductData() [2/2]

Keyzy::ProductData::ProductData ( std::string appId,
std::string apiKey,
std::string productCode,
std::string cryptionKey,
bool useHostIdInOfflineActivation = true,
HostIdScheme hostIdScheme = HostIdScheme::V2 )
inline

Creates the product identity used to authenticate with the KEYZY service.

Parameters
appIdApplication id, from the Keyzy Dashboard.
apiKeyAPI key, from the Keyzy Dashboard.
productCodeProduct code, from the Keyzy Dashboard.
cryptionKeyCryption key used to verify the license file on the device (semi-online and offline activation). Set it in every case.
useHostIdInOfflineActivationIf true (default), the host_id is mixed into the cryption key, so license files are device specific.
hostIdSchemeHost_id generation scheme. Defaults to HostIdScheme::V2.
Warning
Upgrading a product released on an SDK version before 1.10.0: keep HostIdScheme::V2 and call KeyzyLicenseActivator::migrateHostIdV1toV2() on every start; without it, all existing activations must re-activate. A product sold with offline licenses stays on HostIdScheme::V1.

Member Data Documentation

◆ _appId

std::string Keyzy::ProductData::_appId

Member 'appId' contains Id for authentication to Keyzy

◆ _apiKey

std::string Keyzy::ProductData::_apiKey

Member 'apiKey' contains Key for authentication to Keyzy

◆ _productCode

std::string Keyzy::ProductData::_productCode

Member '_productCode' contains product identifier that is defined on Keyzy Dashboard

◆ _cryptionKey

std::string Keyzy::ProductData::_cryptionKey

Cryption key used to verify the license file on the device (semi-online and offline activation). Set it in every case.

◆ _useHostIdInOffilneActivation

bool Keyzy::ProductData::_useHostIdInOffilneActivation

Member '_useHostIdInOffilneActivation' if set true, the host_id will be used to mix with _cryptionKey, so as a result a license file will be device specific

◆ _hostIdScheme

HostIdScheme Keyzy::ProductData::_hostIdScheme

Member '_hostIdScheme' selects the host_id generation scheme, see HostIdScheme. Both schemes are always available; choose one per product. Defaults to V2. A product released on an SDK version before 1.10.0 keeps V2 and calls KeyzyLicenseActivator::migrateHostIdV1toV2() on every start; a product sold with offline licenses stays on V1.