pub enum KeychainError {
TooShort {
offset: usize,
needed: usize,
available: usize,
},
BadSignature {
found: u32,
},
DbBlobMissing,
BadBlobMagic {
found: u32,
offset: usize,
},
MissingTable {
table_type: u32,
},
DecryptionFailed,
InvalidKeyLength,
Locked,
}Expand description
A failure decoding or decrypting a login.keychain-db artifact.
Every variant that reports something unrecognized carries the offending value (magic, offset, length) so an examiner can diagnose it — an “unknown” without the bytes is a dead end (Fail-loud / show-the-value discipline).
Variants§
TooShort
A read ran past the end of the buffer.
BadSignature
The file does not begin with the kych AppleDatabase signature.
DbBlobMissing
The DbBlob metadata record was not found or is malformed.
BadBlobMagic
A CommonBlob magic did not match the expected 0xFADE0711.
MissingTable
A required table type is absent from the schema.
DecryptionFailed
3DES decryption produced invalid PKCS#7 padding — almost always a wrong login password (the master key did not unwrap the DBKey).
InvalidKeyLength
A key or IV had the wrong length for the cipher.
Locked
The DBKey could not be unwrapped with the derived master key: the store is present but locked. The login password is wrong or absent.
Trait Implementations§
Source§impl Debug for KeychainError
impl Debug for KeychainError
Source§impl Display for KeychainError
impl Display for KeychainError
impl Eq for KeychainError
Source§impl Error for KeychainError
impl Error for KeychainError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()