pub enum DecryptError {
InvalidTag,
WrongPlaintextLength,
PlaintextTooLong,
AadTooLong,
Unknown,
}Expand description
Error that can occur during decryption.
Variants§
InvalidTag
The authentication tag is invalid; the ciphertext has been tampered with or the key/nonce/aad is incorrect.
WrongPlaintextLength
The plaintext buffer has the wrong length.
PlaintextTooLong
The plaintext is too long for this algorithm or implementation.
AadTooLong
The AAD is too long for this algorithm or implementation.
Unknown
An unknown error occurred during decryption.
Trait Implementations§
Source§impl Debug for DecryptError
impl Debug for DecryptError
Source§impl Display for DecryptError
impl Display for DecryptError
Source§impl From<DecryptError> for DecryptError
impl From<DecryptError> for DecryptError
Source§fn from(value: DecryptError) -> Self
fn from(value: DecryptError) -> Self
Converts to this type from the input type.
Source§impl From<DecryptError> for DecryptError
impl From<DecryptError> for DecryptError
Source§fn from(value: DecryptError) -> Self
fn from(value: DecryptError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DecryptError
impl PartialEq for DecryptError
impl Eq for DecryptError
impl StructuralPartialEq for DecryptError
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