[−][src]Struct libcryptsetup_rs::CryptLuks2Token
Handle for LUKS2 token operations
Implementations
impl<'a> CryptLuks2Token<'a>
[src]
pub fn json_get(&mut self, token: c_uint) -> Result<Value, LibcryptErr>
[src]
Get contents of a token in JSON format
pub fn json_set(&mut self, input: TokenInput) -> Result<c_uint, LibcryptErr>
[src]
Set contents of a token in JSON format
pub fn status(&mut self, token: c_uint) -> Result<CryptTokenInfo, LibcryptErr>
[src]
Get the token info for a specific token
pub fn luks2_keyring_set(
&mut self,
token: Option<c_uint>,
key_description: &str
) -> Result<c_uint, LibcryptErr>
[src]
&mut self,
token: Option<c_uint>,
key_description: &str
) -> Result<c_uint, LibcryptErr>
Create new LUKS2 keyring token
pub fn luks2_keyring_get(
&mut self,
token: c_uint
) -> Result<String, LibcryptErr>
[src]
&mut self,
token: c_uint
) -> Result<String, LibcryptErr>
Get LUKS2 keyring token description
pub fn assign_keyslot(
&mut self,
token: c_uint,
keyslot: Option<c_uint>
) -> Result<(), LibcryptErr>
[src]
&mut self,
token: c_uint,
keyslot: Option<c_uint>
) -> Result<(), LibcryptErr>
Assign token to keyslot
None
for keyslot assigns all keyslots to the token
pub fn unassign_keyslot(
&mut self,
token: c_uint,
keyslot: Option<c_uint>
) -> Result<(), LibcryptErr>
[src]
&mut self,
token: c_uint,
keyslot: Option<c_uint>
) -> Result<(), LibcryptErr>
Unassign token from keyslot
None
for keyslot unassigns the token from all active keyslots
pub fn is_assigned(
&mut self,
token: c_uint,
keyslot: c_uint
) -> Result<Bool, LibcryptErr>
[src]
&mut self,
token: c_uint,
keyslot: c_uint
) -> Result<Bool, LibcryptErr>
Check if token is assigned
pub fn register(
name: &'static str,
open: crypt_token_open_func,
buffer_free: crypt_token_buffer_free_func,
validate: crypt_token_validate_func,
dump: crypt_token_dump_func
) -> Result<(), LibcryptErr>
[src]
name: &'static str,
open: crypt_token_open_func,
buffer_free: crypt_token_buffer_free_func,
validate: crypt_token_validate_func,
dump: crypt_token_dump_func
) -> Result<(), LibcryptErr>
Register token handler
pub fn activate_by_token<T>(
&mut self,
name: Option<&str>,
token: Option<c_uint>,
usrdata: Option<&mut T>,
flags: CryptActivateFlags
) -> Result<c_uint, LibcryptErr>
[src]
&mut self,
name: Option<&str>,
token: Option<c_uint>,
usrdata: Option<&mut T>,
flags: CryptActivateFlags
) -> Result<c_uint, LibcryptErr>
Activate device or check key using a token
Auto Trait Implementations
impl<'a> RefUnwindSafe for CryptLuks2Token<'a>
impl<'a> !Send for CryptLuks2Token<'a>
impl<'a> !Sync for CryptLuks2Token<'a>
impl<'a> Unpin for CryptLuks2Token<'a>
impl<'a> !UnwindSafe for CryptLuks2Token<'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>,