pub struct CryptSettingsHandle<'a> { /* private fields */ }
Expand description
Handle to operate on cryptsetup device settings
Implementations§
Source§impl<'a> CryptSettingsHandle<'a>
impl<'a> CryptSettingsHandle<'a>
Sourcepub fn set_rng_type(&mut self, rng_type: CryptRng)
pub fn set_rng_type(&mut self, rng_type: CryptRng)
Set random number generator type
Sourcepub fn get_rng_type(&mut self) -> Result<CryptRng, LibcryptErr>
pub fn get_rng_type(&mut self) -> Result<CryptRng, LibcryptErr>
Get random number generator type
Sourcepub fn set_pbkdf_type<'b>(
&mut self,
pbkdf_type: &'b CryptPbkdfType,
) -> Result<(), LibcryptErr>
pub fn set_pbkdf_type<'b>( &mut self, pbkdf_type: &'b CryptPbkdfType, ) -> Result<(), LibcryptErr>
Set PBKDF type
Sourcepub fn get_pbkdf_type_params(
pbkdf_type: &CryptKdf,
) -> Result<CryptPbkdfType, LibcryptErr>
pub fn get_pbkdf_type_params( pbkdf_type: &CryptKdf, ) -> Result<CryptPbkdfType, LibcryptErr>
Get PBKDF parameters
Sourcepub fn get_pbkdf_default(
luks_type: &LuksType,
) -> Result<CryptPbkdfType, LibcryptErr>
pub fn get_pbkdf_default( luks_type: &LuksType, ) -> Result<CryptPbkdfType, LibcryptErr>
Get PBKDF default type
Sourcepub fn get_pbkdf_type(&mut self) -> Result<CryptPbkdfType, LibcryptErr>
pub fn get_pbkdf_type(&mut self) -> Result<CryptPbkdfType, LibcryptErr>
Get PBKDF type
Sourcepub fn set_iteration_time(&mut self, iteration_time_ms: u64)
pub fn set_iteration_time(&mut self, iteration_time_ms: u64)
Set the iteration time in milliseconds
Sourcepub fn memory_lock(&mut self, lock: LockState) -> LockState
pub fn memory_lock(&mut self, lock: LockState) -> LockState
Lock or unlock memory
Sourcepub fn metadata_locking(&mut self, enable: bool) -> Result<(), LibcryptErr>
pub fn metadata_locking(&mut self, enable: bool) -> Result<(), LibcryptErr>
Lock or unlock the metadata
Sourcepub fn set_metadata_size(
&mut self,
metadata_size: MetadataSize,
keyslots_size: KeyslotsSize,
) -> Result<(), LibcryptErr>
pub fn set_metadata_size( &mut self, metadata_size: MetadataSize, keyslots_size: KeyslotsSize, ) -> Result<(), LibcryptErr>
Set the metadata size and keyslot size
Sourcepub fn get_metadata_size(
&mut self,
) -> Result<(MetadataSize, KeyslotsSize), LibcryptErr>
pub fn get_metadata_size( &mut self, ) -> Result<(MetadataSize, KeyslotsSize), LibcryptErr>
Get the metadata size and keyslot size
Auto Trait Implementations§
impl<'a> Freeze for CryptSettingsHandle<'a>
impl<'a> RefUnwindSafe for CryptSettingsHandle<'a>
impl<'a> !Send for CryptSettingsHandle<'a>
impl<'a> !Sync for CryptSettingsHandle<'a>
impl<'a> Unpin for CryptSettingsHandle<'a>
impl<'a> !UnwindSafe for CryptSettingsHandle<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more