[][src]Struct luks2::LuksHeader

pub struct LuksHeader {
    pub magic: [u8; 6],
    pub version: u16,
    pub hdr_size: u64,
    pub seqid: u64,
    pub label: [u8; 48],
    pub csum_alg: [u8; 32],
    pub salt: [u8; 64],
    pub uuid: [u8; 40],
    pub subsystem: [u8; 48],
    pub hdr_offset: u64,
    pub csum: [u8; 64],
    // some fields omitted
}

A LUKS2 header as described here.

Fields

magic: [u8; 6]

must be "LUKS\xba\xbe" or "SKUL\xba\xbe"

version: u16

Version 2

hdr_size: u64

header size plus JSON area in bytes

seqid: u64

sequence ID, increased on update

label: [u8; 48]

ASCII label or empty

csum_alg: [u8; 32]

checksum algorithm, "sha256"

salt: [u8; 64]

salt, unique for every header

uuid: [u8; 40]

UUID of device

subsystem: [u8; 48]

owner subsystem label or empty

hdr_offset: u64

offset from device start in bytes

csum: [u8; 64]

header checksum

Implementations

impl LuksHeader[src]

pub fn read_from<R: Read>(mut reader: &mut R) -> Result<Self, ParseError>[src]

Attempt to read a LUKS2 header from a reader.

Note: a LUKS2 header is always exactly 4096 bytes long.

Trait Implementations

impl Debug for LuksHeader[src]

impl<'de> Deserialize<'de> for LuksHeader[src]

impl Display for LuksHeader[src]

impl PartialEq<LuksHeader> for LuksHeader[src]

impl Serialize for LuksHeader[src]

impl StructuralPartialEq for LuksHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.