mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
shorten the generic identifier
make it long enough that it's unlikely to have two identical ones randomly connected to the same machine but short enough that it's likely/conceivable to have a collision
This commit is contained in:
parent
2d7ee0c614
commit
12d0728582
1 changed files with 4 additions and 1 deletions
|
|
@ -42,7 +42,10 @@ pub fn derive_usb_serial_number(
|
|||
} as u32)
|
||||
.unwrap_or('.');
|
||||
ret.push(c);
|
||||
if ret.len() == 8 {
|
||||
// long enough such that it's unlikely that two devices on one computer will have the same ID
|
||||
// short enough that it's likely to have a collision if used as a global UUID to fingerprint
|
||||
// devices
|
||||
if ret.len() == 6 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue