valid: false.
Generating a Good HWID
A reliable HWID must be stable across reboots and software updates and unique enough to distinguish individual machines. The recommended approach is to read one or more immutable hardware values from the operating system and pass them through a SHA-256 hash. Hashing ensures the raw hardware value (which may be sensitive) never leaves the machine, and produces a fixed-length string suitable for network transmission. Good hardware sources to combine:- Motherboard UUID — embedded in firmware, unique per board, rarely changes
- CPU ID — processor-level identifier, consistent across reboots
/etc/machine-id— generated once at OS installation on Linux, persistent across updatesIOPlatformUUID— Apple’s platform-level UUID on macOS, stable for the life of the hardware
Python Example
The function below detects the current operating system and reads the most reliable available hardware source, then returns a 32-character uppercase hex string derived from a SHA-256 hash.get_hwid() once at application startup, cache the result in memory, and pass it in the hwid field of every POST /licenses/validate request.
The HWID Slot System
Each license has amaxHwids field set when the license is issued. This controls how many distinct hardware identifiers can be bound to a single license key.
- When a validation request arrives with an unrecognised HWID, Avalex checks whether the number of currently bound HWIDs is below
maxHwids. If there is room, the new HWID is registered and the check passes. - When all slots are full, any request from a new, unrecognised HWID returns
valid: false, regardless of whether the license is otherwise valid. - A HWID that is already bound does not consume a new slot — repeated validations from the same machine always succeed (subject to other checks).
- If
maxHwidsisnull, the license accepts an unlimited number of hardware identifiers.
