Struct libcryptsetup_rs::CryptActivation
source · [−]pub struct CryptActivation<'a> { /* private fields */ }
Expand description
Handle for activation options
Implementations
sourceimpl<'a> CryptActivation<'a>
impl<'a> CryptActivation<'a>
sourcepub fn activate_by_passphrase(
&mut self,
name: Option<&str>,
keyslot: Option<c_uint>,
passphrase: &[u8],
flags: CryptActivateFlags
) -> Result<c_uint, LibcryptErr>
pub fn activate_by_passphrase(
&mut self,
name: Option<&str>,
keyslot: Option<c_uint>,
passphrase: &[u8],
flags: CryptActivateFlags
) -> 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: CryptActivateFlags
) -> 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: CryptActivateFlags
) -> 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: CryptActivateFlags
) -> Result<(), LibcryptErr>
pub fn activate_by_volume_key(
&mut self,
name: Option<&str>,
volume_key: Option<&[u8]>,
flags: CryptActivateFlags
) -> 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: CryptActivateFlags
) -> Result<c_uint, LibcryptErr>
pub fn activate_by_keyring(
&mut self,
name: Option<&str>,
key_description: &str,
keyslot: Option<c_uint>,
flags: CryptActivateFlags
) -> Result<c_uint, LibcryptErr>
Activeate device using passphrase in kernel keyring
sourcepub fn deactivate(
&mut self,
name: &str,
flags: CryptDeactivateFlags
) -> Result<(), LibcryptErr>
pub fn deactivate(
&mut self,
name: &str,
flags: CryptDeactivateFlags
) -> Result<(), LibcryptErr>
Deactivate crypt device
Auto Trait Implementations
impl<'a> RefUnwindSafe for CryptActivation<'a>
impl<'a> !Send for CryptActivation<'a>
impl<'a> !Sync for CryptActivation<'a>
impl<'a> Unpin for CryptActivation<'a>
impl<'a> !UnwindSafe for CryptActivation<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more