diff options
Diffstat (limited to 'atuin-client/src/encryption.rs')
| -rw-r--r-- | atuin-client/src/encryption.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/atuin-client/src/encryption.rs b/atuin-client/src/encryption.rs index 4746c23e..f805cbd5 100644 --- a/atuin-client/src/encryption.rs +++ b/atuin-client/src/encryption.rs @@ -77,7 +77,7 @@ pub fn encode_key(key: secretbox::Key) -> Result<String> { pub fn decode_key(key: String) -> Result<secretbox::Key> { let buf = base64::decode(key).wrap_err("encryption key is not a valid base64 encoding")?; - let buf: secretbox::Key = rmp_serde::from_read_ref(&buf) + let buf: secretbox::Key = rmp_serde::from_slice(&buf) .wrap_err("encryption key is not a valid message pack encoding")?; Ok(buf) @@ -98,7 +98,7 @@ pub fn decrypt(encrypted_history: &EncryptedHistory, key: &secretbox::Key) -> Re let plaintext = secretbox::open(&encrypted_history.ciphertext, &encrypted_history.nonce, key) .map_err(|_| eyre!("failed to open secretbox - invalid key?"))?; - let history = rmp_serde::from_read_ref(&plaintext)?; + let history = rmp_serde::from_slice(&plaintext)?; Ok(history) } |
