pub struct BitLockerVolume;Expand description
Namespace for opening a BitLocker volume. All state lives in the returned
DecryptedVolume; this type carries no data itself.
Implementations§
Source§impl BitLockerVolume
impl BitLockerVolume
Sourcepub fn read_metadata<R: Read + Seek>(reader: &mut R) -> Result<FveMetadata>
pub fn read_metadata<R: Read + Seek>(reader: &mut R) -> Result<FveMetadata>
Parse the volume header and the first valid FVE metadata block from
reader, without unlocking. Used by the forensic analyzer to audit the
key protectors even when no password is known.
§Errors
BdeError::NotBitLocker if the header signature is absent, or
BdeError::NoValidMetadata if no -FVE-FS- block is found.
Sourcepub fn unlock_with_password<R: Read + Seek>(
reader: R,
password: &str,
) -> Result<DecryptedVolume<R>>
pub fn unlock_with_password<R: Read + Seek>( reader: R, password: &str, ) -> Result<DecryptedVolume<R>>
Unlock the volume with password, returning a plaintext view.
§Errors
Fails loud on a non-BitLocker image, an unsupported cipher, a missing password protector, absent key material, or a wrong password (the AES-CCM tag fails to verify).
Sourcepub fn unlock_with_recovery_password<R: Read + Seek>(
reader: R,
recovery: &str,
) -> Result<DecryptedVolume<R>>
pub fn unlock_with_recovery_password<R: Read + Seek>( reader: R, recovery: &str, ) -> Result<DecryptedVolume<R>>
Unlock the volume with a 48-digit recovery password, returning a
plaintext view. Uses the recovery protector (0x0800) and the recovery
key-derivation ([crate::crypto::recovery_key_hash]).
§Errors
BdeError::InvalidRecoveryPassword if the recovery password is
malformed; otherwise the same failures as Self::unlock_with_password
(non-BitLocker image, unsupported/unvalidated cipher, no recovery
protector, absent key material, or a wrong key).