[−][src]Trait cryptsetup_rs::api::LuksCryptDevice
Required methods
fn activate(&mut self, name: &str, key: &[u8]) -> Result<Keyslot>
Activate the crypt device, and give it the specified name
fn deactivate(self, name: &str) -> Result<()>
Deactivate the crypt device, remove the device-mapper mapping and key information from kernel
fn destroy_keyslot(&mut self, slot: Keyslot) -> Result<()>
Destroy (and disable) key slot
fn keyslot_status(&self, keyslot: Keyslot) -> crypt_keyslot_info
Get status of key slot
fn dump(&self)
Dump text-formatted information about the current device to stdout
fn uuid(&self) -> Uuid
UUID of the current device
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
Implementors
impl LuksCryptDevice for CryptDeviceHandle<Luks1Params>
[src]
fn activate(&mut self, name: &str, key: &[u8]) -> Result<Keyslot>
[src]
fn deactivate(self, name: &str) -> Result<()>
[src]
fn destroy_keyslot(&mut self, slot: Keyslot) -> Result<()>
[src]
fn keyslot_status(&self, keyslot: Keyslot) -> crypt_keyslot_info
[src]
fn dump(&self)
[src]
fn uuid(&self) -> Uuid
[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>
impl LuksCryptDevice for CryptDeviceHandle<Luks2Params>
[src]
fn activate(&mut self, name: &str, key: &[u8]) -> Result<u8>
[src]
fn deactivate(self, name: &str) -> Result<()>
[src]
fn destroy_keyslot(&mut self, slot: Keyslot) -> Result<()>
[src]
fn keyslot_status(&self, keyslot: Keyslot) -> crypt_keyslot_info
[src]
fn dump(&self)
[src]
fn uuid(&self) -> Uuid
[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>