pub struct RecoveryScanner;Expand description
Scans damaged lockbox storage and reports or salvages recoverable content.
Recovery is intentionally separated from Lockbox because it operates on
storage bytes and can succeed when a normal open fails.
Implementations§
Source§impl RecoveryScanner
impl RecoveryScanner
Sourcepub fn scan_path(path: &Path, key: impl AsRef<[u8]>) -> RecoveryReport
pub fn scan_path(path: &Path, key: impl AsRef<[u8]>) -> RecoveryReport
Scan a lockbox file from disk and report recoverable entries.
Sourcepub fn scan_bytes(bytes: Vec<u8>, key: impl AsRef<[u8]>) -> RecoveryReport
pub fn scan_bytes(bytes: Vec<u8>, key: impl AsRef<[u8]>) -> RecoveryReport
Scan lockbox storage bytes and report recoverable entries.
Sourcepub fn salvage_bytes(
bytes: Vec<u8>,
key: impl AsRef<[u8]>,
signing_key: &OwnerSigningKeyPair,
) -> Result<Lockbox, Error>
pub fn salvage_bytes( bytes: Vec<u8>, key: impl AsRef<[u8]>, signing_key: &OwnerSigningKeyPair, ) -> Result<Lockbox, Error>
Salvage a damaged lockbox from storage bytes into a new opened lockbox.
Returns Error::InvalidKey if the supplied key cannot authenticate any
recoverable records, or Error::CorruptRecord/storage errors if the
recovered content cannot be written into the new lockbox.
Sourcepub fn salvage_bytes_with_secret_key(
bytes: Vec<u8>,
key: &SecureVec,
signing_key: &OwnerSigningKeyPair,
) -> Result<Lockbox, Error>
pub fn salvage_bytes_with_secret_key( bytes: Vec<u8>, key: &SecureVec, signing_key: &OwnerSigningKeyPair, ) -> Result<Lockbox, Error>
Salvage a damaged lockbox using a content key held in secure memory.
Auto Trait Implementations§
impl Freeze for RecoveryScanner
impl RefUnwindSafe for RecoveryScanner
impl Send for RecoveryScanner
impl Sync for RecoveryScanner
impl Unpin for RecoveryScanner
impl UnsafeUnpin for RecoveryScanner
impl UnwindSafe for RecoveryScanner
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