pub enum DecryptionError {
CiphertextTooShort,
AuthenticationFailed,
}
Expand description
Errors that can happend during symmetric decryption.
Variants§
CiphertextTooShort
Ciphertext (which should be prepended by the nonce) is shorter than the nonce length.
AuthenticationFailed
The ciphertext and the attached authentication data are inconsistent. This can happen if:
- an incorrect key is used,
- the ciphertext is modified or cut short,
- an incorrect authentication data is provided on decryption.
Trait Implementations§
Source§impl Debug for DecryptionError
impl Debug for DecryptionError
Source§impl Display for DecryptionError
impl Display for DecryptionError
Source§impl PartialEq for DecryptionError
impl PartialEq 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