Struct rustls::kx::KeyExchange
source · pub(crate) struct KeyExchange {
skxg: &'static SupportedKxGroup,
privkey: EphemeralPrivateKey,
pub(crate) pubkey: PublicKey,
}
Expand description
An in-progress key exchange. This has the algorithm, our private key, and our public key.
Fields§
§skxg: &'static SupportedKxGroup
§privkey: EphemeralPrivateKey
§pubkey: PublicKey
Implementations§
source§impl KeyExchange
impl KeyExchange
sourcepub(crate) fn choose(
name: NamedGroup,
supported: &[&'static SupportedKxGroup],
) -> Option<&'static SupportedKxGroup>
pub(crate) fn choose( name: NamedGroup, supported: &[&'static SupportedKxGroup], ) -> Option<&'static SupportedKxGroup>
Choose a SupportedKxGroup by name, from a list of supported groups.
sourcepub(crate) fn start(skxg: &'static SupportedKxGroup) -> Option<Self>
pub(crate) fn start(skxg: &'static SupportedKxGroup) -> Option<Self>
Start a key exchange, using the given SupportedKxGroup.
This generates an ephemeral key pair and stores it in the returned KeyExchange object.
sourcepub(crate) fn group(&self) -> NamedGroup
pub(crate) fn group(&self) -> NamedGroup
Return the group being used.
Auto Trait Implementations§
impl Freeze for KeyExchange
impl RefUnwindSafe for KeyExchange
impl Send for KeyExchange
impl Sync for KeyExchange
impl Unpin for KeyExchange
impl UnwindSafe for KeyExchange
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