Legacy algorithms
Before standardizing the hardware ID algorithms, different LicenseSpring SDKs used to compute slightly different hardware IDs. Each platform that SDKs run on had a default algorithm and alternative algorithms.
Default Algorithm
Linux
The default device id reads the machine id from the /etc/machine-id file. This file contains the unique machine ID of the local system that is set during installation or boot. If this id is not found, it tries to read the /var/lib/dbus/machine-id file. If it still fails to get the id, it writes a generated UUID.
Windows Algorithms
C++ SDK
.Net SDK
Cloud Platform Algorithms
Hardware ID Usage
Configuration
After choosing an algorithm, set it in ExtendedOptions or LicenseSpringConfiguration.
LicenseSpring::ExtendedOptions options;
options.setDeviceIdAlgorithm(AutoId);var options = new ExtendedOptions();
options.DeviceIdAlgorithm = DeviceIDAlgorithm.AutoId;configuration.hardwareID = generateMyOwnCustomID()LicenseSpringConfiguration config = LicenseSpringConfiguration.builder()
.identityProvider(HardwareIdStrategy.AUTO_HARDWARE_ID)
.build();The .NET SDK allows specifying the timeout for cloud platforms ID requests. It is useful when AutoId takes too long on a regular machine. This value is specified in milliseconds; the default is 200.
The SDK allows overriding hardware ID. For instance, you can use the MAC address as the hardware ID:
Was this helpful?