Trait CryptDevice

Source
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§

Source

fn path(&self) -> &Path

Path the device was opened/created with

Source

fn cipher(&self) -> &str

Name of cipher used

Source

fn cipher_mode(&self) -> &str

Name of cipher mode used

Source

fn device_name(&self) -> &str

Path to the underlying device (as reported by libcryptsetup)

Source

fn rng_type(&self) -> crypt_rng_type

Random number generator used for operations on this crypt device

Source

fn set_rng_type(&mut self, rng_type: crypt_rng_type)

Sets the random number generator to use

Source

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.

Source

fn volume_key_size(&self) -> u8

Volume key size (in bytes)

Implementors§