pub struct LuksVolume;Expand description
Namespace for opening a LUKS volume. State lives in DecryptedPayload.
Implementations§
Source§impl LuksVolume
impl LuksVolume
Sourcepub fn unlock_with_passphrase<R: Read + Seek>(
reader: R,
passphrase: &[u8],
) -> Result<DecryptedPayload<R>>
pub fn unlock_with_passphrase<R: Read + Seek>( reader: R, passphrase: &[u8], ) -> Result<DecryptedPayload<R>>
Unlock a LUKS1 or LUKS2 container, auto-detecting the version from the header.
§Errors
See Self::unlock1_with_passphrase / Self::unlock2_with_passphrase.
Sourcepub fn unlock1_with_passphrase<R: Read + Seek>(
reader: R,
passphrase: &[u8],
) -> Result<DecryptedPayload<R>>
pub fn unlock1_with_passphrase<R: Read + Seek>( reader: R, passphrase: &[u8], ) -> Result<DecryptedPayload<R>>
Unlock a LUKS1 container from reader with passphrase.
§Errors
Header-parse errors, LuksError::NoActiveKeyslot, or
LuksError::AuthenticationFailed on a wrong passphrase.
Sourcepub fn unlock2_with_passphrase<R: Read + Seek>(
reader: R,
passphrase: &[u8],
) -> Result<DecryptedPayload<R>>
pub fn unlock2_with_passphrase<R: Read + Seek>( reader: R, passphrase: &[u8], ) -> Result<DecryptedPayload<R>>
Unlock a LUKS2 container from reader with passphrase.
§Errors
Header/JSON-parse errors, LuksError::NoActiveKeyslot if there is no
crypt segment or keyslot, or LuksError::AuthenticationFailed.
Auto Trait Implementations§
impl Freeze for LuksVolume
impl RefUnwindSafe for LuksVolume
impl Send for LuksVolume
impl Sync for LuksVolume
impl Unpin for LuksVolume
impl UnsafeUnpin for LuksVolume
impl UnwindSafe for LuksVolume
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