/// QUIC-specific API for extracting a header-protection key. /// /// # Errors /// /// Errors if HKDF fails or if context creation fails. /// /// # Panics /// /// When `cipher` is not known to this code. pubfn extract(version: Version, cipher: Cipher, prk: &SymKey, label: &str) -> Res<Self> {
header_protection::Key::extract(version, cipher, prk, label).map(Self)
}
/// Duplicate this key, creating a new independent instance. /// /// # Errors /// /// Errors if context creation fails. pubfn try_clone(&self) -> Res<Self> { self.0.try_clone().map(Self)
}
/// Generate a header protection mask for QUIC. /// /// # Errors /// /// An error is returned if the underlying cryptographic functions fail. pubfn mask(&self, sample: &[u8; SAMPLE_SIZE]) -> Res<[u8; SAMPLE_SIZE]> { self.0.mask(sample)
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.