pub enum EncError {
Kdf(InvalidLength),
StreamEnd(StreamCipherError),
PadError(PadError),
}
Expand description
Error when encrypting message
EncError::PadError
may happen when an invalid size buffer is supplied for in-place
encryption. Other errors should happen in very rare cases.
Variants§
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(PadError)
Error of symmetric encryption, caused by passing a too small buffer to
PublicKey::block_encrypt_in_place
Trait Implementations§
Source§impl Error for EncError
impl Error for EncError
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 EncError
impl RefUnwindSafe for EncError
impl Send for EncError
impl Sync for EncError
impl Unpin for EncError
impl UnwindSafe for EncError
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