pub struct DeriveCtx { /* private fields */ }Expand description
Asymmetric key-agreement context (EVP_PKEY_CTX in derive mode).
Implementations§
Source§impl DeriveCtx
impl DeriveCtx
Sourcepub fn new(key: &Pkey<Private>) -> Result<Self, ErrorStack>
pub fn new(key: &Pkey<Private>) -> Result<Self, ErrorStack>
Create a derive context from a private key.
§Errors
Sourcepub fn set_peer(&mut self, peer: &Pkey<Public>) -> Result<(), ErrorStack>
pub fn set_peer(&mut self, peer: &Pkey<Public>) -> Result<(), ErrorStack>
Set the peer’s public key.
§Errors
Sourcepub fn derive_len(&mut self) -> Result<usize, ErrorStack>
pub fn derive_len(&mut self) -> Result<usize, ErrorStack>
Query the required output length (call with empty slice).
§Errors
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeriveCtx
impl RefUnwindSafe for DeriveCtx
impl !Send for DeriveCtx
impl !Sync for DeriveCtx
impl Unpin for DeriveCtx
impl UnsafeUnpin for DeriveCtx
impl UnwindSafe for DeriveCtx
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