[−][src]Trait cryptsetup_rs::api::Luks1CryptDevice
Trait representing specific operations on a LUKS1 device
Required methods
fn activate(&mut self, name: &str, key: &[u8]) -> Result<Keyslot>
Activate the crypt device, and give it the specified name
fn add_keyslot(
&mut self,
key: &[u8],
maybe_prev_key: Option<&[u8]>,
maybe_keyslot: Option<Keyslot>
) -> Result<Keyslot>
&mut self,
key: &[u8],
maybe_prev_key: Option<&[u8]>,
maybe_keyslot: Option<Keyslot>
) -> Result<Keyslot>
Add a new keyslot with the specified key
fn update_keyslot(
&mut self,
key: &[u8],
prev_key: &[u8],
maybe_keyslot: Option<Keyslot>
) -> Result<Keyslot>
&mut self,
key: &[u8],
prev_key: &[u8],
maybe_keyslot: Option<Keyslot>
) -> Result<Keyslot>
Replace an old key with a new one
fn destroy_keyslot(&mut self, slot: Keyslot) -> Result<()>
Destroy (and disable) key slot
fn dump(&self)
Dump text-formatted information about the current device to stdout
fn hash_spec(&self) -> &str
Get the hash algorithm used
fn keyslot_status(&self, keyslot: Keyslot) -> crypt_keyslot_info
Get status of key slot
fn mk_bits(&self) -> u32
Number of bits in the master key
fn mk_digest(&self) -> &[u8; 20]
Master key header digest
fn mk_iterations(&self) -> u32
Master key PBKDF2
iterations
fn mk_salt(&self) -> &[u8; 32]
Master key salt
fn payload_offset(&self) -> u32
Get the offset of the payload
fn uuid(&self) -> Uuid
UUID of the current device
Implementors
impl Luks1CryptDevice for CryptDeviceHandle<Luks1Params>
[src]
fn activate(&mut self, name: &str, key: &[u8]) -> Result<Keyslot>
[src]
fn add_keyslot(
&mut self,
key: &[u8],
maybe_prev_key: Option<&[u8]>,
maybe_keyslot: Option<Keyslot>
) -> Result<Keyslot>
[src]
&mut self,
key: &[u8],
maybe_prev_key: Option<&[u8]>,
maybe_keyslot: Option<Keyslot>
) -> Result<Keyslot>
fn update_keyslot(
&mut self,
key: &[u8],
prev_key: &[u8],
maybe_keyslot: Option<Keyslot>
) -> Result<Keyslot>
[src]
&mut self,
key: &[u8],
prev_key: &[u8],
maybe_keyslot: Option<Keyslot>
) -> Result<Keyslot>