Hardware ID

Both LicenseAPI and LicenseManager use the Hardware ID module to calculate a unique fingerprint for the local machine. The module provides multiple methods of determining the ID:

export enum HardwareIdAlgorithm {
  Default = 0,
  WindowsHardwareFingerprintId = 1,
  WindowsComputerSystemProductId = 2,
  WindowsCryptographyId = 3,
  LinuxMachineId = 4,
  CloudPlatformsId = 5,
};

The default method (0) covers all cases and fallbacks. If you override the default method, the method used should be consistent across your project. For both LicenseAPI and LicenseManager, this can be overridden globally by setting the required value in the config object when initializing the LicenseAPI/LicenseManager, e.g.:

example.js
const licenseAPI = new LicenseAPI({
  apiKey: '12345678-4bfe-4e3a-8737-757004d6294c',
  sharedKey: 'eYuHrlajvIVTiSFIXpxpKhw78f4Ewy-00-12345678',
  appName: 'js-sdk-test-1',
  appVersion: '0.0.1',
  hardwareIDMethod: 5,
});
circle-info

Ensure the chosen hardware ID method is used consistently across your project (both LicenseAPI and LicenseManager) to avoid mismatches.

Was this helpful?