Trait KeyProvider
pub trait KeyProvider {
type Header: HeaderKey;
type Packet: PacketKey;
// Required method
fn initial_keys(
&self,
version: Version,
dcid: &[u8],
side: Side,
) -> Result<InitialKeys<Self::Header, Self::Packet>, CaptureError>;
}Available on crate features
quic and std only.Expand description
Supplies the Initial keys needed to open a captured first flight.
A passive observer and the destination server both derive Initial keys from the destination connection ID and version salt (RFC 9001 §5.2), so both can implement this. The key types are associated so a provider yields whatever it holds without a forced allocation.
Required Associated Types§
Required Methods§
fn initial_keys(
&self,
version: Version,
dcid: &[u8],
side: Side,
) -> Result<InitialKeys<Self::Header, Self::Packet>, CaptureError>
fn initial_keys( &self, version: Version, dcid: &[u8], side: Side, ) -> Result<InitialKeys<Self::Header, Self::Packet>, CaptureError>
Initial keys for dcid under version, as side opens them: a server opens the client’s
Initials, a client the server’s.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".