#[non_exhaustive]pub enum ReencryptError {
Decrypt(DecryptError),
Encrypt(EncryptError),
PartiallyEncrypted,
UnexpectedStreams,
Io(Error),
}crypto-ops only.Expand description
Failures from reencrypt_to.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Decrypt(DecryptError)
The source could not be decrypted with the old password: every
DecryptError it can be, except DecryptError::Io, which is
reported as ReencryptError::Io.
Encrypt(EncryptError)
The output could not be encrypted with the new password – an empty one,
say, or an unaffordable Argon2id cost. EncryptError::Io is reported
as ReencryptError::Io.
PartiallyEncrypted
A per-entry source in which some listed content is not encrypted: a
manifest row with no complete encryption-data
(crate::Classification::has_non_encrypted_entries), or encrypted
rows with no row on content.xml to latch the package as encrypted.
Re-encrypting would carry that plaintext into a container whose AEAD
tag then vouches for it. This crate’s policy, not LibreOffice’s:
crate::decrypt_to still decrypts the package, as LibreOffice opens
it, after a warning (ERRCODE_SFX_INCOMPLETE_ENCRYPTION).
UnexpectedStreams
A per-entry source with zip members its manifest does not list. Not fatal to LibreOffice below ODF 1.2, but carried into the output they would be authenticated by its tag. Policy, as above.
Io(Error)
The caller’s reader or writer failed. A reader failure is the reader’s own error and takes precedence, so a cancel is reported as a cancel.
Trait Implementations§
Source§impl Debug for ReencryptError
impl Debug for ReencryptError
Source§impl Display for ReencryptError
impl Display for ReencryptError
Source§impl Error for ReencryptError
impl Error for ReencryptError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<DecryptError> for ReencryptError
impl From<DecryptError> for ReencryptError
Source§fn from(e: DecryptError) -> Self
fn from(e: DecryptError) -> Self
Source§impl From<EncryptError> for ReencryptError
impl From<EncryptError> for ReencryptError
Source§fn from(e: EncryptError) -> Self
fn from(e: EncryptError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ReencryptError
impl !UnwindSafe for ReencryptError
impl Forget for ReencryptError
impl Freeze for ReencryptError
impl Move for ReencryptError
impl Send for ReencryptError
impl Sync for ReencryptError
impl Unpin for ReencryptError
impl UnsafeUnpin for ReencryptError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more