Struct libcryptsetup_rs::CryptActivationHandle
source · pub struct CryptActivationHandle<'a> { /* private fields */ }
Expand description
Handle for activation options
Implementations§
source§impl<'a> CryptActivationHandle<'a>
impl<'a> CryptActivationHandle<'a>
sourcepub fn activate_by_passphrase(
&mut self,
name: Option<&str>,
keyslot: Option<c_uint>,
passphrase: &[u8],
flags: CryptActivate
) -> Result<c_uint, LibcryptErr>
pub fn activate_by_passphrase( &mut self, name: Option<&str>, keyslot: Option<c_uint>, passphrase: &[u8], flags: CryptActivate ) -> Result<c_uint, LibcryptErr>
Activate device by passphrase.
A value of None
for the name will only check the passphrase and will
not activate the keyslot.
sourcepub fn activate_by_keyfile_device_offset(
&mut self,
name: Option<&str>,
keyslot: Option<c_uint>,
keyfile: &Path,
keyfile_size: Option<size_t>,
keyfile_offset: u64,
flags: CryptActivate
) -> Result<c_uint, LibcryptErr>
pub fn activate_by_keyfile_device_offset( &mut self, name: Option<&str>, keyslot: Option<c_uint>, keyfile: &Path, keyfile_size: Option<size_t>, keyfile_offset: u64, flags: CryptActivate ) -> Result<c_uint, LibcryptErr>
Activate device by key file
sourcepub fn activate_by_volume_key(
&mut self,
name: Option<&str>,
volume_key: Option<&[u8]>,
flags: CryptActivate
) -> Result<(), LibcryptErr>
pub fn activate_by_volume_key( &mut self, name: Option<&str>, volume_key: Option<&[u8]>, flags: CryptActivate ) -> Result<(), LibcryptErr>
Activate device by volume key
sourcepub fn activate_by_keyring(
&mut self,
name: Option<&str>,
key_description: &str,
keyslot: Option<c_uint>,
flags: CryptActivate
) -> Result<c_uint, LibcryptErr>
pub fn activate_by_keyring( &mut self, name: Option<&str>, key_description: &str, keyslot: Option<c_uint>, flags: CryptActivate ) -> Result<c_uint, LibcryptErr>
Activeate device using passphrase in kernel keyring
sourcepub fn deactivate(
&mut self,
name: &str,
flags: CryptDeactivate
) -> Result<(), LibcryptErr>
pub fn deactivate( &mut self, name: &str, flags: CryptDeactivate ) -> Result<(), LibcryptErr>
Deactivate crypt device
Auto Trait Implementations§
impl<'a> Freeze for CryptActivationHandle<'a>
impl<'a> RefUnwindSafe for CryptActivationHandle<'a>
impl<'a> !Send for CryptActivationHandle<'a>
impl<'a> !Sync for CryptActivationHandle<'a>
impl<'a> Unpin for CryptActivationHandle<'a>
impl<'a> !UnwindSafe for CryptActivationHandle<'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