pub struct Pbes2KeyUnwrapper { /* private fields */ }Available on crate features
signatures and key-wrapping-pbes2 only.Expand description
PBES2-HS256+A256KW key unwrapper (password-based).
Derives the same KEK from the password and salt/iterations stored in the wrapped data, then unwraps the content encryption key.
Implementations§
Source§impl Pbes2KeyUnwrapper
impl Pbes2KeyUnwrapper
Sourcepub fn unwrap(&self, data: &Pbes2WrappedKeyData) -> Result<Vec<u8>>
pub fn unwrap(&self, data: &Pbes2WrappedKeyData) -> Result<Vec<u8>>
Unwrap a content encryption key.
Uses the salt and iteration count from the wrapped data to derive the KEK, then unwraps the content key.
§Errors
Returns an error if the password is wrong, the wrapped data is tampered, or the iteration count is outside the allowed range.
Auto Trait Implementations§
impl Freeze for Pbes2KeyUnwrapper
impl RefUnwindSafe for Pbes2KeyUnwrapper
impl Send for Pbes2KeyUnwrapper
impl Sync for Pbes2KeyUnwrapper
impl Unpin for Pbes2KeyUnwrapper
impl UnsafeUnpin for Pbes2KeyUnwrapper
impl UnwindSafe for Pbes2KeyUnwrapper
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