pub trait CryptDevice {
// Required methods
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)