pub struct CryptSettingsHandle<'a> { /* private fields */ }
Expand description

Handle to operate on cryptsetup device settings

Implementations§

source§

impl<'a> CryptSettingsHandle<'a>

source

pub fn set_rng_type(&mut self, rng_type: CryptRng)

Set random number generator type

source

pub fn get_rng_type(&mut self) -> Result<CryptRng, LibcryptErr>

Get random number generator type

source

pub fn set_pbkdf_type<'b>( &mut self, pbkdf_type: &'b CryptPbkdfType ) -> Result<(), LibcryptErr>

Set PBKDF type

source

pub fn get_pbkdf_type_params( pbkdf_type: &CryptKdf ) -> Result<CryptPbkdfType, LibcryptErr>

Get PBKDF parameters

source

pub fn get_pbkdf_default( luks_type: &LuksType ) -> Result<CryptPbkdfType, LibcryptErr>

Get PBKDF default type

source

pub fn get_pbkdf_type(&mut self) -> Result<CryptPbkdfType, LibcryptErr>

Get PBKDF type

source

pub fn set_iteration_time(&mut self, iteration_time_ms: u64)

Set the iteration time in milliseconds

source

pub fn memory_lock(&mut self, lock: LockState) -> LockState

Lock or unlock memory

source

pub fn metadata_locking(&mut self, enable: bool) -> Result<(), LibcryptErr>

Lock or unlock the metadata

source

pub fn set_metadata_size( &mut self, metadata_size: MetadataSize, keyslots_size: KeyslotsSize ) -> Result<(), LibcryptErr>

Set the metadata size and keyslot size

source

pub fn get_metadata_size( &mut self ) -> Result<(MetadataSize, KeyslotsSize), LibcryptErr>

Get the metadata size and keyslot size

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.