pub fn server_key_and_nonce(&self) -> Option<([u8; 16], [u8; 12])> {
        let traffic_secret = self.server_traffic_secret.as_ref()?;

        let key: [u8; 16] = hkdf_expand_label(traffic_secret, b"key", &[]).into();
        let mut iv: GenericArray<u8, U12> = hkdf_expand_label(traffic_secret, b"iv", &[]);
        self.read_record_sequence_number
            .to_be_bytes()
            .iter()
            .enumerate()
            .for_each(|(idx, byte)| iv[idx + 4] ^= byte);
        Some((key, iv.into()))
    }
/// Get the server key and nonce.
///
/// # References
///
/// * [RFC 8446 Section 7.3](https://datatracker.ietf.org/doc/html/rfc8446#ref-sender)
///
/// ```text
/// [sender]_write_key = HKDF-Expand-Label(Secret, "key", "", key_length)
/// ```
Get the server key and nonce.
Get the server key and nonce .
pub fn server_key_and_nonce(&self) -> Option<([u8; 16], [u8; 12])> {
        let traffic_secret = self.server_traffic_secret.as_ref()?;
        let key: [u8; 16] = hkdf_expand_label(traffic_secret, b"key", &[]).into();
        let mut iv: GenericArray<u8, U12> = hkdf_expand_label(traffic_secret, b"iv", &[]);
        self.read_record_sequence_number
            .to_be_bytes()
            .iter()
            .enumerate()
            .for_each(|(idx, byte)| iv[idx + 4] ^= byte);
        Some((key, iv.into()))
    }
pub fn server_key_and_nonce ( & self ) -> Option < ( [ u8 ; 16 ] , [ u8 ; 12 ] ) > { let traffic_secret = self . server_traffic_secret . as_ref ( ) ? ; let key : [ u8 ; 16 ] = hkdf_expand_label ( traffic_secret , b" " , & [ ] ) . into ( ) ; let mut iv : GenericArray < u8 , U12 > = hkdf_expand_label ( traffic_secret , b" " , & [ ] ) ; self . read_record_sequence_number . to_be_bytes ( ) . iter ( ) . enumerate ( ) . for_each ( | ( idx , byte ) | iv [ idx + 4 ] ^= byte ) ; Some ( ( key , iv . into ( ) ) ) }
Get the server key and nonce.
Get the server key and nonce .
&self
&self
references


```text
[sender]_write_key = HKDF-Expand-Label(Secret, "key", "", key_length)
```
` ` ` text [ sender ] _write_key = HKDF - Expand - Label ( Secret " key " " " key_length ) ` ` `