mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-25 06:01:00 +03:00
trust this device to skip 2fa (#9012)
* trust this device to skip 2fa Signed-off-by: 21pages <sunboeasy@gmail.com> * Update connection.rs --------- Signed-off-by: 21pages <sunboeasy@gmail.com> Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
@@ -1494,6 +1494,15 @@ pub fn is_empty_uni_link(arg: &str) -> bool {
|
||||
arg[prefix.len()..].chars().all(|c| c == '/')
|
||||
}
|
||||
|
||||
pub fn get_hwid() -> Bytes {
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
let uuid = hbb_common::get_uuid();
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.update(&uuid);
|
||||
Bytes::from(hasher.finalize().to_vec())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user