pub enum PrivacyError {
InvalidPrivParamsLength {
expected: usize,
actual: usize,
},
InvalidCiphertextLength {
length: usize,
block_size: usize,
},
InvalidKeyLength,
CipherError,
UnsupportedProtocol,
}Expand description
Error type for privacy (encryption/decryption) operations.
These errors indicate cryptographic failures. Callers should convert
these to Error::Auth with appropriate target context.
Variants§
InvalidPrivParamsLength
Invalid privParameters length (expected 8 bytes).
InvalidCiphertextLength
Ciphertext length not a multiple of block size.
InvalidKeyLength
Invalid key length for cipher.
CipherError
Cipher operation failed.
UnsupportedProtocol
Unsupported privacy protocol.
Trait Implementations§
Source§impl Clone for PrivacyError
impl Clone for PrivacyError
Source§fn clone(&self) -> PrivacyError
fn clone(&self) -> PrivacyError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrivacyError
impl Debug for PrivacyError
Source§impl Display for PrivacyError
impl Display for PrivacyError
Source§impl Error for PrivacyError
impl Error for PrivacyError
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()
Source§impl PartialEq for PrivacyError
impl PartialEq for PrivacyError
impl Copy for PrivacyError
impl Eq for PrivacyError
impl StructuralPartialEq for PrivacyError
Auto Trait Implementations§
impl Freeze for PrivacyError
impl RefUnwindSafe for PrivacyError
impl Send for PrivacyError
impl Sync for PrivacyError
impl Unpin for PrivacyError
impl UnwindSafe for PrivacyError
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