pub struct DecapCtx { /* private fields */ }Expand description
KEM decapsulation context (recipient’s private key).
Implementations§
Source§impl DecapCtx
impl DecapCtx
Sourcepub fn new(key: &Pkey<Private>) -> Result<Self, ErrorStack>
pub fn new(key: &Pkey<Private>) -> Result<Self, ErrorStack>
Create a KEM decapsulation context from the recipient’s private key.
§Errors
Sourcepub fn decapsulate(&mut self, wrapped_key: &[u8]) -> Result<Vec<u8>, ErrorStack>
pub fn decapsulate(&mut self, wrapped_key: &[u8]) -> Result<Vec<u8>, ErrorStack>
Recover the shared secret from a wrapped key.
§Errors
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecapCtx
impl RefUnwindSafe for DecapCtx
impl !Send for DecapCtx
impl !Sync for DecapCtx
impl Unpin for DecapCtx
impl UnwindSafe for DecapCtx
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