mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-05-25 17:19:15 +00:00
refact(password): simplify
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -1429,15 +1429,11 @@ impl Config {
|
||||
Self::get_salt()
|
||||
}
|
||||
|
||||
fn has_usable_local_permanent_password() -> bool {
|
||||
pub fn has_local_permanent_password() -> bool {
|
||||
let (local_storage, local_salt) = Self::get_local_permanent_password_storage_and_salt();
|
||||
local_permanent_password_storage_is_usable_for_auth(&local_storage, &local_salt)
|
||||
}
|
||||
|
||||
pub fn has_local_permanent_password() -> bool {
|
||||
Self::has_usable_local_permanent_password()
|
||||
}
|
||||
|
||||
// This shouldn't happen under normal circumstances because the salt
|
||||
// should be automatically generated when migrating to hash storage.
|
||||
// Actually, it is better to avoid calling set_salt at all.
|
||||
|
||||
Reference in New Issue
Block a user