mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-05 08:37:15 +00:00
1 parent
08c4d2a1cf
commit
1100b2a465
53 files changed
+350
-28
No files matched your search
@@ -840,3 +840,17 @@ pub fn is_peer_version_ge(v: &str) -> bool {
|
||||
|
||||
false
|
||||
}
|
||||
|
||||
pub fn pk_to_fingerprint(pk: Vec<u8>) -> String {
|
||||
let s: String = pk.iter().map(|u| format!("{:02x}", u)).collect();
|
||||
s.chars()
|
||||
.enumerate()
|
||||
.map(|(i, c)| {
|
||||
if i > 0 && i % 4 == 0 {
|
||||
format!(" {}", c)
|
||||
} else {
|
||||
format!("{}", c)
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
Reference in new issue
Block a user