[−][src]Struct libcryptsetup_rs::CryptKeyslot
Handle for keyslot operations
Implementations
impl<'a> CryptKeyslot<'a>
[src]
pub fn add_by_passphrase(
&mut self,
keyslot: Option<c_uint>,
passphrase: &[u8],
new_passphrase: &[u8]
) -> Result<c_uint, LibcryptErr>
[src]
&mut self,
keyslot: Option<c_uint>,
passphrase: &[u8],
new_passphrase: &[u8]
) -> Result<c_uint, LibcryptErr>
Add key slot using a passphrase
pub fn change_by_passphrase(
&mut self,
keyslot_old: Option<c_uint>,
keyslot_new: Option<c_uint>,
passphrase: &[u8],
new_passphrase: &[u8]
) -> Result<c_int, LibcryptErr>
[src]
&mut self,
keyslot_old: Option<c_uint>,
keyslot_new: Option<c_uint>,
passphrase: &[u8],
new_passphrase: &[u8]
) -> Result<c_int, LibcryptErr>
Change allocated key slot using a passphrase
pub fn add_by_keyfile_device_offset(
&mut self,
keyslot: Option<c_uint>,
keyfile_and_size: (&Path, size_t),
keyfile_offset: u64,
new_keyfile_and_size: (&Path, size_t),
new_keyfile_offset: u64
) -> Result<c_uint, LibcryptErr>
[src]
&mut self,
keyslot: Option<c_uint>,
keyfile_and_size: (&Path, size_t),
keyfile_offset: u64,
new_keyfile_and_size: (&Path, size_t),
new_keyfile_offset: u64
) -> Result<c_uint, LibcryptErr>
Add key slot using key file
pub fn add_by_key(
&mut self,
keyslot: Option<c_uint>,
volume_key: Option<&[u8]>,
passphrase: &[u8],
flags: CryptVolumeKeyFlags
) -> Result<c_uint, LibcryptErr>
[src]
&mut self,
keyslot: Option<c_uint>,
volume_key: Option<&[u8]>,
passphrase: &[u8],
flags: CryptVolumeKeyFlags
) -> Result<c_uint, LibcryptErr>
Add key slot with a key
pub fn destroy(&mut self, keyslot: c_uint) -> Result<(), LibcryptErr>
[src]
Destroy key slot
pub fn status(&mut self, keyslot: c_uint) -> Result<KeyslotInfo, LibcryptErr>
[src]
Get keyslot status
pub fn get_priority(
&mut self,
keyslot: c_uint
) -> Result<KeyslotPriority, LibcryptErr>
[src]
&mut self,
keyslot: c_uint
) -> Result<KeyslotPriority, LibcryptErr>
Get keyslot priority (LUKS2 specific)
pub fn set_priority(
&mut self,
keyslot: c_uint,
priority: KeyslotPriority
) -> Result<(), LibcryptErr>
[src]
&mut self,
keyslot: c_uint,
priority: KeyslotPriority
) -> Result<(), LibcryptErr>
Get keyslot priority (LUKS2 specific)
pub fn max_keyslots(fmt: EncryptionFormat) -> Result<c_uint, LibcryptErr>
[src]
Get maximum keyslots supported for device type
pub fn area(&mut self, keyslot: c_uint) -> Result<(u64, u64), LibcryptErr>
[src]
Get keyslot area pointers
pub fn get_key_size(&mut self, keyslot: c_uint) -> Result<c_uint, LibcryptErr>
[src]
Get size of key in keyslot - only different from crypt_get_volume_key_size()
binding
in the case of LUKS2 using unbound keyslots
pub fn get_encryption(
&mut self,
keyslot: Option<c_uint>
) -> Result<(&str, size_t), LibcryptErr>
[src]
&mut self,
keyslot: Option<c_uint>
) -> Result<(&str, size_t), LibcryptErr>
Get encryption cipher and key size of keyslot (not data)
pub fn get_pbkdf(
&mut self,
keyslot: c_uint
) -> Result<CryptPbkdfType, LibcryptErr>
[src]
&mut self,
keyslot: c_uint
) -> Result<CryptPbkdfType, LibcryptErr>
Get PBDKF parameters for a keyslot
pub fn set_encryption(
&mut self,
cipher: &str,
key_size: size_t
) -> Result<(), LibcryptErr>
[src]
&mut self,
cipher: &str,
key_size: size_t
) -> Result<(), LibcryptErr>
Set encryption used for keyslot
pub fn get_dir() -> Result<Box<Path>, LibcryptErr>
[src]
Get directory where crypt devices are mapped
Auto Trait Implementations
impl<'a> RefUnwindSafe for CryptKeyslot<'a>
impl<'a> !Send for CryptKeyslot<'a>
impl<'a> !Sync for CryptKeyslot<'a>
impl<'a> Unpin for CryptKeyslot<'a>
impl<'a> !UnwindSafe for CryptKeyslot<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,