enum KeyExchangeChoice {
Whole(Box<dyn ActiveKeyExchange>),
Component(Box<dyn ActiveKeyExchange>),
}
Variants§
Whole(Box<dyn ActiveKeyExchange>)
Component(Box<dyn ActiveKeyExchange>)
Implementations§
Source§impl KeyExchangeChoice
impl KeyExchangeChoice
Sourcefn new(
config: &Arc<ClientConfig>,
cx: &mut Context<'_, ClientConnectionData>,
our_key_share: Box<dyn ActiveKeyExchange>,
their_key_share: &KeyShareEntry,
) -> Result<Self, ()>
fn new( config: &Arc<ClientConfig>, cx: &mut Context<'_, ClientConnectionData>, our_key_share: Box<dyn ActiveKeyExchange>, their_key_share: &KeyShareEntry, ) -> Result<Self, ()>
Decide between our_key_share
or our_key_share.hybrid_component()
based on the selection of the server expressed in their_key_share
.
fn complete(self, peer_pub_key: &[u8]) -> Result<SharedSecret, Error>
Auto Trait Implementations§
impl Freeze for KeyExchangeChoice
impl !RefUnwindSafe for KeyExchangeChoice
impl Send for KeyExchangeChoice
impl Sync for KeyExchangeChoice
impl Unpin for KeyExchangeChoice
impl !UnwindSafe for KeyExchangeChoice
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