Class HardwareId
This entity represents a compound identifier derived from several hardware components of a Windows system. It corresponds to the deserialized output of the associated PowerShell script responsible for HWID generation.
Data sources
Win32_Processor.ProcessorID— Unique identifier(s) for the system’s physical processor(s).Win32_BIOS— Includes the following properties:SMBIOSBIOSVersionSMBIOSMajorVersionSMBIOSMinorVersionSystemBiosMajorVersionSystemBiosMinorVersion
Win32_BaseBoard— Includes the following properties:ManufacturerModelOtherIdentifyingInfoPartNumberSerialNumberSKUVersionProduct
ID generation
The associated PowerShell script performs the following operations:
- Retrieves the combined IDs from the aforementioned classes
- Trims whitespaces and filters out
nullor empty values. - Sorts all identifiers.
- Joins them using a
|delimiter to formrawHWID. - Computes the SHA-256 hash of this concatenated string.
- Formats the hash into a
8-4-4-4-12-16-16grouped representation stored inhashHWID.
While the generated HWID is designed to be unique per system, its uniqueness depends on the values provided by the
hardware manufacturers. In cases where components report generic or missing
information (e.g., baseboards using "Default String" as a serial number, null for
model or SKU, or placeholder versions like "x.x"), multiple systems may end up sharing the
same HWID. In such cases, the Win32_Processor.ProcessorID property becomes the source of uniqueness, provided
this value can be detected during runtime.
Usage example
HardwareId hwid = HardwareId.builder()
.rawHWID("UUID|DISK1|CPU1")
.hashHWID("03560274-043C-05B7-4C06-C80700080009")
.build();
- Since:
- 3.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
rawHWID
Collection of IDs for several components, grouped together by a de-limiter.Should be used for debug purposes only
For production applications, use
hashHWIDRead the class level documentation to know more about how this information is collected
-
hashHWID
-
-
Constructor Details
-
HardwareId
public HardwareId()
-
-
Method Details
-
toString
-