diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-05-03 01:19:49 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-05-03 01:54:08 -0400 |
commit | e89ecaf0792dea1d36b6f071cb32bf79665c8e37 (patch) | |
tree | 773f85d0c08691a795cb512986ce6650054de66b /src/actions.rs | |
parent | e28b23f713fda315d28aaf6a375a720aae166f78 (diff) | |
download | rbw-e89ecaf0792dea1d36b6f071cb32bf79665c8e37.tar.gz rbw-e89ecaf0792dea1d36b6f071cb32bf79665c8e37.zip |
refactor encrypt/decrypt methods to indicate symmetric encryption
since we're going to have to also implement asymmetric encryption
Diffstat (limited to 'src/actions.rs')
-rw-r--r-- | src/actions.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/actions.rs b/src/actions.rs index 861d734..9284677 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -16,7 +16,7 @@ pub async fn login( .login(&identity.email, &identity.master_password_hash) .await?; let master_keys = crate::cipherstring::CipherString::new(&protected_key)? - .decrypt_locked(&identity.keys)?; + .decrypt_locked_symmetric(&identity.keys)?; Ok(( access_token, @@ -39,7 +39,7 @@ pub async fn unlock( let protected_key = crate::cipherstring::CipherString::new(protected_key)?; - match protected_key.decrypt_locked(&identity.keys) { + match protected_key.decrypt_locked_symmetric(&identity.keys) { Ok(master_keys) => Ok(crate::locked::Keys::new(master_keys)), Err(Error::InvalidMac) => Err(Error::IncorrectPassword), Err(e) => Err(e), |