pub enum CipherError {
InvalidKey,
InvalidIv,
InvalidBlockSize,
NotTrustworthy,
OpenSSL(ErrorStack),
}
Expand description
Cipher
related error codes.
Variants§
InvalidKey
The cipher key is invalid/too short.
InvalidIv
The cipher iv is invalid/too short.
InvalidBlockSize
The size of the block to be encrypted/decrypted is invalid and must be aligned at the block size of the cipher.
NotTrustworthy
A cipher-text is not trustworthy.
If an authenticated decryption is performed, and the tag mismatches, this error is raised.
OpenSSL(ErrorStack)
An error in the OpenSSL library occured.
Trait Implementations§
Source§impl Debug for CipherError
impl Debug for CipherError
Source§impl Display for CipherError
impl Display for CipherError
Source§impl Error for CipherError
impl Error for CipherError
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()
Source§impl<B: Backend> From<CipherError> for Error<B>
impl<B: Backend> From<CipherError> for Error<B>
Source§fn from(source: CipherError) -> Self
fn from(source: CipherError) -> Self
Converts to this type from the input type.
Source§impl From<CipherError> for HeaderError
impl From<CipherError> for HeaderError
Source§fn from(source: CipherError) -> Self
fn from(source: CipherError) -> Self
Converts to this type from the input type.
Source§impl From<ErrorStack> for CipherError
impl From<ErrorStack> for CipherError
Source§fn from(source: ErrorStack) -> Self
fn from(source: ErrorStack) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CipherError
impl RefUnwindSafe for CipherError
impl Send for CipherError
impl Sync for CipherError
impl Unpin for CipherError
impl UnwindSafe for CipherError
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