pub struct HeaderProtectionKey { /* private fields */ }
Expand description
A key for generating QUIC Header Protection masks.
Implementations
sourceimpl HeaderProtectionKey
impl HeaderProtectionKey
sourcepub fn new(
algorithm: &'static Algorithm,
key_bytes: &[u8]
) -> Result<Self, Unspecified>
pub fn new(
algorithm: &'static Algorithm,
key_bytes: &[u8]
) -> Result<Self, Unspecified>
Create a new header protection key.
key_bytes
must be exactly algorithm.key_len
bytes long.
sourcepub fn new_mask(&self, sample: &[u8]) -> Result<[u8; 5], Unspecified>
pub fn new_mask(&self, sample: &[u8]) -> Result<[u8; 5], Unspecified>
Generate a new QUIC Header Protection mask.
sample
must be exactly self.algorithm().sample_len()
bytes long.
Trait Implementations
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more