Struct ring::aead::quic::HeaderProtectionKey [−][src]
pub struct HeaderProtectionKey { /* fields omitted */ }Expand description
A key for generating QUIC Header Protection masks.
Implementations
impl HeaderProtectionKey[src]
impl HeaderProtectionKey[src]pub fn new(
algorithm: &'static Algorithm,
key_bytes: &[u8]
) -> Result<Self, Unspecified>[src]
pub fn new(
algorithm: &'static Algorithm,
key_bytes: &[u8]
) -> Result<Self, Unspecified>[src]Create a new header protection key.
key_bytes must be exactly algorithm.key_len bytes long.
pub fn new_mask(&self, sample: &[u8]) -> Result<[u8; 5], Unspecified>[src]
pub fn new_mask(&self, sample: &[u8]) -> Result<[u8; 5], Unspecified>[src]Generate a new QUIC Header Protection mask.
sample must be exactly self.algorithm().sample_len() bytes long.