Skip to main content

os_user_id_bytes

Function os_user_id_bytes 

Source
pub fn os_user_id_bytes() -> Option<Vec<u8>>
Expand description

Stable per-OS-user identifier bytes — the salt that keeps two different users on one shared host (same machine_id) from cross-pairing (#182 §S1).

  • Unix: id -u (the numeric uid). Shelled out rather than pulling in a libc dependency, matching this module’s existing shell-out idiom.
  • Windows: the current user’s SID from whoami /user.

None on read failure (fail-closed, same as machine_id_raw).