Trait cryptsetup_rs::api::CryptDevice
source · [−]pub trait CryptDevice {
fn path(&self) -> &Path;
fn cipher(&self) -> &str;
fn cipher_mode(&self) -> &str;
fn device_name(&self) -> &str;
fn rng_type(&self) -> crypt_rng_type;
fn set_rng_type(&mut self, rng_type: crypt_rng_type);
fn set_iteration_time(&mut self, iteration_time_ms: u64);
fn volume_key_size(&self) -> u8;
}
Expand description
Trait representing common operations on a crypt device
Required Methods
sourcefn cipher_mode(&self) -> &str
fn cipher_mode(&self) -> &str
Name of cipher mode used
sourcefn device_name(&self) -> &str
fn device_name(&self) -> &str
Path to the underlying device (as reported by libcryptsetup
)
sourcefn rng_type(&self) -> crypt_rng_type
fn rng_type(&self) -> crypt_rng_type
Random number generator used for operations on this crypt device
sourcefn set_rng_type(&mut self, rng_type: crypt_rng_type)
fn set_rng_type(&mut self, rng_type: crypt_rng_type)
Sets the random number generator to use
sourcefn set_iteration_time(&mut self, iteration_time_ms: u64)
fn set_iteration_time(&mut self, iteration_time_ms: u64)
Sets the iteration time for the PBKDF2
function. Note that this does not affect the MK iterations.
sourcefn volume_key_size(&self) -> u8
fn volume_key_size(&self) -> u8
Volume key size (in bytes)