machineid-rs
machineid-rs copied to clipboard
hardware id changed after macOS upgrade
I am using this code - my guess is SystemID changed after the update?:
fn generate_hardware_id() -> String {
let mut builder = IdBuilder::new(Encryption::SHA256);
builder
.add_component(HWIDComponent::SystemID)
.add_component(HWIDComponent::CPUID);
// DriverSerial only working on Mac, so we skip it
#[cfg(target_os = "macos")]
builder.add_component(HWIDComponent::DriveSerial);
let hwid = builder.build(".:.").unwrap();
return hwid;
}