Struct libcryptsetup_rs::CryptSettingsHandle
source · 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