pub enum DecryptionError {
Null,
InvalidLength,
BadFormat,
KeyDerivation(KeyDerivationError),
Failed,
}
Expand description
Error when trying to decrypt data.
Variants§
Null
Data to be decrypted is empty.
InvalidLength
There’s not enough data to decrypt.
BadFormat
Provided data has invalid format, incompatible with TES.
KeyDerivation(KeyDerivationError)
Deriving key failed.
Failed
Failure due to encrypted data being invalid.
Can happen when:
- data is invalid
- note that it can happen due to bitrot – i.e. even a single byte getting corrupted can render data ~impossible to decrypt
- not all encrypted bytes were provided
- some bytes that aren’t encrypted were provided after encrypted bytes
Trait Implementations§
Source§impl Clone for DecryptionError
impl Clone for DecryptionError
Source§fn clone(&self) -> DecryptionError
fn clone(&self) -> DecryptionError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DecryptionError
impl Debug for DecryptionError
Source§impl Display for DecryptionError
impl Display for DecryptionError
Source§impl Fail for DecryptionError
impl Fail for DecryptionError
Source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moreSource§impl From<KeyDerivationError> for DecryptionError
impl From<KeyDerivationError> for DecryptionError
Source§fn from(err: KeyDerivationError) -> DecryptionError
fn from(err: KeyDerivationError) -> DecryptionError
Converts to this type from the input type.
Source§impl PartialEq for DecryptionError
impl PartialEq for DecryptionError
impl Copy for DecryptionError
impl Eq for DecryptionError
impl StructuralPartialEq for DecryptionError
Auto Trait Implementations§
impl Freeze for DecryptionError
impl RefUnwindSafe for DecryptionError
impl Send for DecryptionError
impl Sync for DecryptionError
impl Unpin for DecryptionError
impl UnwindSafe for DecryptionError
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