pub enum DecryptError {
TooSmall,
KeyOrParametersMismatch,
PageAuthFailed(u32),
TooLarge,
}Expand description
Why decryption could not proceed. Every variant is a loud, recoverable failure — decryption never panics and never emits plausible-but-wrong bytes.
Variants§
TooSmall
The input is smaller than the 16-byte salt — not a SQLCipher file.
KeyOrParametersMismatch
No shipped profile’s page-1 HMAC verified: the key is wrong, or the database uses non-default cipher parameters this decryptor does not model.
PageAuthFailed(u32)
A page past page 1 failed HMAC authentication after page 1 verified — consistent with tampering or corruption of an otherwise-valid database. Carries the 1-based page number (show-the-offending-value).
TooLarge
The file holds more pages than a 32-bit page number can address.
Trait Implementations§
Source§impl Clone for DecryptError
impl Clone for DecryptError
Source§fn clone(&self) -> DecryptError
fn clone(&self) -> DecryptError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DecryptError
impl Debug for DecryptError
impl Eq for DecryptError
Source§impl From<DecryptError> for Error
impl From<DecryptError> for Error
Source§fn from(e: DecryptError) -> Self
fn from(e: DecryptError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DecryptError
impl PartialEq for DecryptError
impl StructuralPartialEq for DecryptError
Auto Trait Implementations§
impl Freeze for DecryptError
impl RefUnwindSafe for DecryptError
impl Send for DecryptError
impl Sync for DecryptError
impl Unpin for DecryptError
impl UnsafeUnpin for DecryptError
impl UnwindSafe for DecryptError
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