pub enum DecryptError {
DecryptionFailed,
ExcessiveWork {
required: u8,
target: u8,
},
InvalidHeader,
InvalidMac,
Io(Error),
KeyDecryptionFailed,
MissingPlugin {
binary_name: String,
},
NoMatchingKeys,
Plugin(Vec<PluginError>),
UnknownFormat,
}Expand description
The various errors that can be returned during the decryption process.
Variants§
DecryptionFailed
The age file failed to decrypt.
ExcessiveWork
The age file used an excessive work factor for passphrase encryption.
Fields
InvalidHeader
The age header was invalid.
InvalidMac
The MAC in the age header was invalid.
Io(Error)
An I/O error occurred during decryption.
KeyDecryptionFailed
Failed to decrypt an encrypted key.
MissingPlugin
Available on crate feature
plugin only.A required plugin could not be found.
NoMatchingKeys
None of the provided keys could be used to decrypt the age file.
Plugin(Vec<PluginError>)
Available on crate feature
plugin only.Errors from a plugin.
UnknownFormat
An unknown age format, probably from a newer version.
Trait Implementations§
Source§impl Clone for DecryptError
impl Clone for DecryptError
Source§impl Debug for DecryptError
impl Debug for DecryptError
Source§impl Display for DecryptError
impl Display for DecryptError
Source§impl Error for DecryptError
impl Error for DecryptError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for DecryptError
impl From<Error> for DecryptError
Source§impl From<Error> for DecryptError
impl From<Error> for DecryptError
Source§impl From<Error> for DecryptError
Available on crate feature ssh only.
impl From<Error> for DecryptError
Available on crate feature
ssh only.Auto Trait Implementations§
impl Freeze for DecryptError
impl !RefUnwindSafe for DecryptError
impl Send for DecryptError
impl Sync for DecryptError
impl Unpin for DecryptError
impl !UnwindSafe for DecryptError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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