pub struct VolumeKey(/* private fields */);Expand description
A LUKS volume key used to encrypt and decrypt the actual data on the device.
This key is derived from an UnlockKey (passphrase) and a keyslot.
It is protected while in memory and is automatically zeroed when no longer needed.
Implementations§
Source§impl VolumeKey
impl VolumeKey
Sourcepub fn new(bytes: Vec<u8>) -> Result<Self, LuksError>
pub fn new(bytes: Vec<u8>) -> Result<Self, LuksError>
Creates a new volume key from its raw bytes.
Returns an error if the provided bytes length is not a valid LUKS volume key size.
Sourcepub fn expose_bytes(&self) -> &[u8] ⓘ
pub fn expose_bytes(&self) -> &[u8] ⓘ
Unboxes the volume key, returning its raw bytes for use in cryptographic operations.
Auto Trait Implementations§
impl Freeze for VolumeKey
impl RefUnwindSafe for VolumeKey
impl Send for VolumeKey
impl Sync for VolumeKey
impl Unpin for VolumeKey
impl UnsafeUnpin for VolumeKey
impl UnwindSafe for VolumeKey
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