(source: &str)
| 125 | } |
| 126 | |
| 127 | fn host_identity_from_source(source: &str) -> String { |
| 128 | let digest = hex::encode(Sha256::digest(source.as_bytes())); |
| 129 | digest[..16].to_owned() |
| 130 | } |
| 131 | |
| 132 | #[cfg(target_os = "macos")] |
| 133 | fn machine_identity_source() -> Option<String> { |