Struct luks2::LuksHeader[][src]

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
}
Expand description

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

Attempt to read a LUKS2 header from a reader.

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

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.