machineid-rs icon indicating copy to clipboard operation
machineid-rs copied to clipboard

hardware id changed after macOS upgrade

Open SeanPedersen opened this issue 5 months ago • 0 comments

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;
}

SeanPedersen avatar Aug 12 '25 21:08 SeanPedersen