use crate::client::hash::argon2_hash_from_unsecure_salt;
pub type MachineUid = [u8; 32];
pub fn machine_uid() -> anyhow::Result<MachineUid> {
#[cfg(not(target_os = "android"))]
{
argon2_hash_from_unsecure_salt(
::machine_uid::get()
.map_err(|err| anyhow::anyhow!(err.to_string()))?
.as_bytes(),
"ddnet-hw-id".into(),
)
}
#[cfg(target_os = "android")]
argon2_hash_from_unsecure_salt(&<MachineUid>::default(), "ddnet-hw-id".into())
}