aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-08 03:45:45 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-08 03:45:45 -0400
commit56d47b757da04bdb4414e350e6438a93242f53c8 (patch)
treeba28afa56e7746f9c33f8021c37d2c2b45d41204 /src/api.rs
parent47968ec94ee172f5ae8924f2bb3850142e77dcd3 (diff)
downloadrbw-56d47b757da04bdb4414e350e6438a93242f53c8.tar.gz
rbw-56d47b757da04bdb4414e350e6438a93242f53c8.zip
mlock sensitive memory
Diffstat (limited to 'src/api.rs')
-rw-r--r--src/api.rs4
1 files changed, 2 insertions, 2 deletions
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,