pub trait LuksCryptDevice: CryptDevice + CryptDeviceType {
// Required methods
fn activate(&mut self, name: &str, key: &[u8]) -> Result<Keyslot>;
fn deactivate(self, name: &str) -> Result<()>;
fn destroy_keyslot(&mut self, slot: Keyslot) -> Result<()>;
fn keyslot_status(&self, keyslot: Keyslot) -> crypt_keyslot_info;
fn dump(&self);
fn uuid(&self) -> Uuid;
fn add_keyslot(
&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>;
}
Required Methods§
Sourcefn activate(&mut self, name: &str, key: &[u8]) -> Result<Keyslot>
fn activate(&mut self, name: &str, key: &[u8]) -> Result<Keyslot>
Activate the crypt device, and give it the specified name
Sourcefn deactivate(self, name: &str) -> Result<()>
fn deactivate(self, name: &str) -> Result<()>
Deactivate the crypt device, remove the device-mapper mapping and key information from kernel
Sourcefn destroy_keyslot(&mut self, slot: Keyslot) -> Result<()>
fn destroy_keyslot(&mut self, slot: Keyslot) -> Result<()>
Destroy (and disable) key slot
Sourcefn keyslot_status(&self, keyslot: Keyslot) -> crypt_keyslot_info
fn keyslot_status(&self, keyslot: Keyslot) -> crypt_keyslot_info
Get status of key slot