Struct quinn_noise::NoiseSession[][src]

pub struct NoiseSession { /* fields omitted */ }

Trait Implementations

impl ClientConfig<NoiseSession> for NoiseConfig[src]

fn new() -> Self[src]

Construct the default configuration

fn start_session(
    &self,
    _: &str,
    params: &TransportParameters
) -> Result<NoiseSession, ConnectError>
[src]

Start a client session with this configuration

impl Session for NoiseSession[src]

type HandshakeData = ()

Parameters determined when the handshake begins, e.g. server name and/or application protocol Read more

type Identity = PublicKey

Cryptographic identity of the peer

type ClientConfig = NoiseConfig

Type used to hold configuration for client sessions

type ServerConfig = Arc<NoiseConfig>

Type used to hold configuration for server sessions

type HmacKey = Key

Type used to sign various values

type HandshakeTokenKey = Prk

Key used to generate one-time-use handshake token keys

type HeaderKey = PlaintextHeaderKey

Type of keys used to protect packet headers

type PacketKey = ChaCha8PacketKey

Type used to represent packet protection keys

fn initial_keys(_: &ConnectionId, _: Side) -> Keys<Self>[src]

Create the initial set of keys given the client’s initial destination ConnectionId

fn next_1rtt_keys(&mut self) -> KeyPair<Self::PacketKey>[src]

Compute keys for the next key update

fn read_handshake(&mut self, handshake: &[u8]) -> Result<bool, TransportError>[src]

Read bytes of handshake data Read more

fn write_handshake(&mut self, handshake: &mut Vec<u8>) -> Option<Keys<Self>>[src]

Writes handshake bytes into the given buffer and optionally returns the negotiated keys Read more

fn is_handshaking(&self) -> bool[src]

Returns true until the connection is fully established.

fn peer_identity(&self) -> Option<Self::Identity>[src]

Get the peer’s identity, if available

fn transport_parameters(
    &self
) -> Result<Option<TransportParameters>, TransportError>
[src]

The peer’s QUIC transport parameters Read more

fn handshake_data(&self) -> Option<Self::HandshakeData>[src]

Get data negotiated during the handshake, if available Read more

fn export_keying_material(
    &self,
    output: &mut [u8],
    label: &[u8],
    context: &[u8]
) -> Result<(), ExportKeyingMaterialError>
[src]

Fill output with output.len() bytes of keying material derived from the Session’s secrets, using label and context for domain separation. Read more

fn early_crypto(&self) -> Option<(Self::HeaderKey, Self::PacketKey)>[src]

Get the 0-RTT keys if available (clients only) Read more

fn early_data_accepted(&self) -> Option<bool>[src]

If the 0-RTT-encrypted data has been accepted by the peer

fn retry_tag(orig_dst_cid: &ConnectionId, packet: &[u8]) -> [u8; 16][src]

Generate the integrity tag for a retry packet

fn is_valid_retry(
    orig_dst_cid: &ConnectionId,
    header: &[u8],
    payload: &[u8]
) -> bool
[src]

Verify the integrity of a retry packet

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V