pub struct VeraHeader {
pub flavor: Flavor,
pub version: u16,
pub encrypted_area_start: u64,
pub encrypted_area_size: u64,
pub volume_size: u64,
pub hidden_size: u64,
pub sector_size: u32,
pub master_keys: [u8; 256],
}Expand description
The forensically-relevant fields of a decrypted VeraCrypt header.
Fields§
§flavor: FlavorVeraCrypt or TrueCrypt.
version: u16Header format version.
encrypted_area_start: u64Byte offset where the encrypted data area begins.
encrypted_area_size: u64Size of the encrypted data area in bytes.
volume_size: u64Declared volume size in bytes.
Hidden-volume size (non-zero only in an outer volume’s header).
sector_size: u32Sector size (usually 512).
master_keys: [u8; 256]The 256-byte concatenated master-key material.
Implementations§
Source§impl VeraHeader
impl VeraHeader
Sourcepub fn validate(dec: &[u8]) -> Option<VeraHeader>
pub fn validate(dec: &[u8]) -> Option<VeraHeader>
Validate a candidate 448-byte decrypted header: the magic must be VERA
or TRUE and both CRC-32 checks must pass. Returns None otherwise, so
a wrong PRF/cipher/password is rejected (no false positives).
Trait Implementations§
Source§impl Clone for VeraHeader
impl Clone for VeraHeader
Source§fn clone(&self) -> VeraHeader
fn clone(&self) -> VeraHeader
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 moreAuto Trait Implementations§
impl Freeze for VeraHeader
impl RefUnwindSafe for VeraHeader
impl Send for VeraHeader
impl Sync for VeraHeader
impl Unpin for VeraHeader
impl UnsafeUnpin for VeraHeader
impl UnwindSafe for VeraHeader
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