From 56d47b757da04bdb4414e350e6438a93242f53c8 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 8 Apr 2020 03:45:45 -0400 Subject: mlock sensitive memory --- src/api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api.rs') diff --git a/src/api.rs b/src/api.rs index 9637630..fc59d25 100644 --- a/src/api.rs +++ b/src/api.rs @@ -119,12 +119,12 @@ impl Client { pub async fn login( &self, email: &str, - master_password_hash: &[u8], + master_password_hash: &crate::locked::PasswordHash, ) -> Result<(String, String, String)> { let connect_req = ConnectReq { grant_type: "password".to_string(), username: email.to_string(), - password: base64::encode(&master_password_hash), + password: base64::encode(master_password_hash.hash()), scope: "api offline_access".to_string(), client_id: "desktop".to_string(), device_type: 8, -- cgit v1.2.3-54-g00ecf