Struct s2n_quic_crypto::one_rtt::OneRttKey
source · pub struct OneRttKey(/* private fields */);
Implementations§
source§impl OneRttKey
impl OneRttKey
sourcepub fn new_server(
algorithm: &Algorithm,
secrets: SecretPair
) -> Option<(Self, OneRttHeaderKey)>
pub fn new_server( algorithm: &Algorithm, secrets: SecretPair ) -> Option<(Self, OneRttHeaderKey)>
Create a server cipher suite with a given negotiated algorithm and secret
sourcepub fn new_client(
algorithm: &Algorithm,
secrets: SecretPair
) -> Option<(Self, OneRttHeaderKey)>
pub fn new_client( algorithm: &Algorithm, secrets: SecretPair ) -> Option<(Self, OneRttHeaderKey)>
Create a client cipher suite with a given negotiated algorithm and secret
sourcepub fn new(
endpoint: Type,
algorithm: &Algorithm,
secrets: SecretPair
) -> Option<(Self, OneRttHeaderKey)>
pub fn new( endpoint: Type, algorithm: &Algorithm, secrets: SecretPair ) -> Option<(Self, OneRttHeaderKey)>
Create a cipher_suite for an endpoint type with a given negotiated algorithm and secret
sourcepub fn update(&self) -> Self
pub fn update(&self) -> Self
Update the cipher suite as defined in https://www.rfc-editor.org/rfc/rfc9001#section-6
Trait Implementations§
source§impl Key for OneRttKey
impl Key for OneRttKey
source§fn decrypt(
&self,
packet_number: u64,
header: &[u8],
payload: &mut [u8]
) -> Result<(), Error>
fn decrypt( &self, packet_number: u64, header: &[u8], payload: &mut [u8] ) -> Result<(), Error>
Decrypt a payload
source§fn encrypt(
&self,
packet_number: u64,
header: &[u8],
payload: &mut Buffer<'_>
) -> Result<(), Error>
fn encrypt( &self, packet_number: u64, header: &[u8], payload: &mut Buffer<'_> ) -> Result<(), Error>
Encrypt a payload
source§fn aead_confidentiality_limit(&self) -> u64
fn aead_confidentiality_limit(&self) -> u64
Maximum number of packets a key can encrypt
source§fn aead_integrity_limit(&self) -> u64
fn aead_integrity_limit(&self) -> u64
Maximum number of decryption failures allowed for a cipher_suite
fn cipher_suite(&self) -> CipherSuite
source§impl OneRttKey for OneRttKey
impl OneRttKey for OneRttKey
fn derive_next_key(&self) -> Self
fn update_sealer_pmtu(&mut self, pmtu: u16)
fn update_opener_pmtu(&mut self, pmtu: u16)
Auto Trait Implementations§
impl Freeze for OneRttKey
impl RefUnwindSafe for OneRttKey
impl Send for OneRttKey
impl Sync for OneRttKey
impl Unpin for OneRttKey
impl UnwindSafe for OneRttKey
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more