pub struct FveMetadata {
pub encryption_method: u16,
pub volume_guid: [u8; 16],
pub creation_time: u64,
pub entries: Vec<MetadataEntry>,
pub encrypted_volume_size: u64,
pub volume_header_offset: u64,
pub volume_header_size: u64,
pub metadata_offsets: [u64; 3],
pub metadata_size: u32,
}Expand description
A parsed FVE metadata block: cipher, identity, and the entry array, plus the block-header fields the read path needs (encrypted size and the relocated volume-header region).
Fields§
§encryption_method: u16Volume encryption method (metadata header offset 36).
volume_guid: [u8; 16]Volume identifier GUID (metadata header offset 16).
creation_time: u64Volume creation time as a Windows FILETIME (metadata header offset 40).
entries: Vec<MetadataEntry>The metadata entries.
encrypted_volume_size: u64Number of still-encrypted bytes from the front (block header, v2 offset 16). Zero means “whole volume”.
volume_header_offset: u64Byte offset where the original volume header is stored, relocated.
volume_header_size: u64Size in bytes of the relocated volume-header region.
metadata_offsets: [u64; 3]Byte offsets of the three metadata blocks (read back as zeros).
metadata_size: u32Size of the metadata region (metadata header offset 0).
Implementations§
Source§impl FveMetadata
impl FveMetadata
Sourcepub fn parse(block: &[u8], bytes_per_sector: u16) -> Option<FveMetadata>
pub fn parse(block: &[u8], bytes_per_sector: u16) -> Option<FveMetadata>
Parse an FVE metadata block from bytes beginning at its block header.
Returns None when the -FVE-FS- block-header signature is absent, so
the caller can try the next candidate block offset.
Sourcepub fn vmk_entries(&self) -> impl Iterator<Item = &MetadataEntry>
pub fn vmk_entries(&self) -> impl Iterator<Item = &MetadataEntry>
Iterate the VMK protector entries.
Sourcepub fn protector_types(&self) -> Vec<u16>
pub fn protector_types(&self) -> Vec<u16>
The key-protection types present, in metadata order.
Sourcepub fn fvek_entry(&self) -> Option<&MetadataEntry>
pub fn fvek_entry(&self) -> Option<&MetadataEntry>
The top-level FVEK entry (an AES-CCM encrypted key wrapped by the VMK).
Trait Implementations§
Source§impl Clone for FveMetadata
impl Clone for FveMetadata
Source§fn clone(&self) -> FveMetadata
fn clone(&self) -> FveMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more