pub struct KeyExchange {
pub skxg: &'static SupportedKxGroup,
pub privkey: EphemeralPrivateKey,
pub 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 fn choose(
name: NamedGroup,
supported: &[&'static SupportedKxGroup],
) -> Option<&'static SupportedKxGroup>
pub fn choose( name: NamedGroup, supported: &[&'static SupportedKxGroup], ) -> Option<&'static SupportedKxGroup>
Choose a SupportedKxGroup by name, from a list of supported groups.
sourcepub fn start(skxg: &'static SupportedKxGroup) -> Option<Self>
pub 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 fn group(&self) -> NamedGroup
pub 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
§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.