pub enum DecError {
MacInvalid(MacError),
Kdf(InvalidLength),
StreamEnd(StreamCipherError),
PadError(UnpadError),
}
Expand description
Error when encrypting message
Most errors can happen when a message has been tampered with.
Variants§
MacInvalid(MacError)
Invalid MAC, caused by tampering with the message or using the wrong key
Kdf(InvalidLength)
Rare error for KDF. May be caused by invalid EC instance
StreamEnd(StreamCipherError)
Rare error fo symmetric encryption. May be cause by trying to encrypt too much data
PadError(UnpadError)
Error unpadding, might be caused by sender sending a corrupted message
Trait Implementations§
Source§impl Error for DecError
impl Error for DecError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for DecError
impl RefUnwindSafe for DecError
impl Send for DecError
impl Sync for DecError
impl Unpin for DecError
impl UnwindSafe for DecError
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