wauth.utils module¶
Platform utilities for machine identification and key derivation.
- wauth.utils.get_machine_id()[source]¶
Retrieve a unique machine identifier in a cross-platform way.
Attempts platform-specific methods in the following order:
Linux: Reads
/etc/machine-idor/var/lib/dbus/machine-id.Windows: Queries
wmic csproduct get uuid.macOS: Extracts
IOPlatformUUIDfromioreg.
Falls back to
platform.node()(hostname) if all methods fail.- Returns:
A string representing the machine ID.
- Return type: