Struct holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dependencies::rustls::quic::HeaderProtectionKey
pub struct HeaderProtectionKey(_);
Expand description
A QUIC header protection key
Implementations
impl HeaderProtectionKey
impl HeaderProtectionKey
pub fn encrypt_in_place(
&self,
sample: &[u8],
first: &mut u8,
packet_number: &mut [u8]
) -> Result<(), Error>
pub fn encrypt_in_place(
&self,
sample: &[u8],
first: &mut u8,
packet_number: &mut [u8]
) -> Result<(), Error>
Adds QUIC Header Protection.
sample
must contain the sample of encrypted payload; see
Header Protection Sample.
first
must reference the first byte of the header, referred to as
packet[0]
in Header Protection Application.
packet_number
must reference the Packet Number field; this is
packet[pn_offset:pn_offset+pn_length]
in Header Protection Application.
Returns an error without modifying anything if sample
is not
the correct length (see Header Protection Sample and Self::sample_len()
),
or packet_number
is longer than allowed (see Packet Number Encoding and Decoding).
Otherwise, first
and packet_number
will have the header protection added.
pub fn decrypt_in_place(
&self,
sample: &[u8],
first: &mut u8,
packet_number: &mut [u8]
) -> Result<(), Error>
pub fn decrypt_in_place(
&self,
sample: &[u8],
first: &mut u8,
packet_number: &mut [u8]
) -> Result<(), Error>
Removes QUIC Header Protection.
sample
must contain the sample of encrypted payload; see
Header Protection Sample.
first
must reference the first byte of the header, referred to as
packet[0]
in Header Protection Application.
packet_number
must reference the Packet Number field; this is
packet[pn_offset:pn_offset+pn_length]
in Header Protection Application.
Returns an error without modifying anything if sample
is not
the correct length (see Header Protection Sample and Self::sample_len()
),
or packet_number
is longer than allowed (see
Packet Number Encoding and Decoding).
Otherwise, first
and packet_number
will have the header protection removed.
pub fn sample_len(&self) -> usize
pub fn sample_len(&self) -> usize
Expected sample length for the key’s algorithm
Trait Implementations
impl HeaderKey for HeaderProtectionKey
impl HeaderKey for HeaderProtectionKey
Auto Trait Implementations
impl RefUnwindSafe for HeaderProtectionKey
impl Send for HeaderProtectionKey
impl Sync for HeaderProtectionKey
impl Unpin for HeaderProtectionKey
impl UnwindSafe for HeaderProtectionKey
Blanket Implementations
impl<T> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
sourcefn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
sourcefn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.