diff --git a/crates/bitwarden/src/vault/cipher/attachment.rs b/crates/bitwarden/src/vault/cipher/attachment.rs index ace4937da..e2d11f592 100644 --- a/crates/bitwarden/src/vault/cipher/attachment.rs +++ b/crates/bitwarden/src/vault/cipher/attachment.rs @@ -28,7 +28,7 @@ pub struct AttachmentView { pub size: Option, pub size_name: Option, pub file_name: Option, - pub key: Option>, // TODO: Should be made into SymmetricCryptoKey + pub key: Option, } impl KeyEncryptable for AttachmentView { @@ -39,7 +39,7 @@ impl KeyEncryptable for AttachmentView { size: self.size, size_name: self.size_name, file_name: self.file_name.encrypt_with_key(key)?, - key: self.key.as_deref().encrypt_with_key(key)?, + key: self.key, }) } } @@ -52,7 +52,7 @@ impl KeyDecryptable for Attachment { size: self.size.clone(), size_name: self.size_name.clone(), file_name: self.file_name.decrypt_with_key(key)?, - key: self.key.decrypt_with_key(key)?, + key: self.key.clone(), }) } }