pub fn encrypt_record(
record: &TlsRecord,
key: &[u8],
iv: &[u8; 12],
seq_num: u64,
cipher: CipherSuite,
) -> Option<TlsRecord>Expand description
Wrap a plaintext record into an encrypted TLS 1.3 record.
TLS 1.3 encrypted records have content_type = ApplicationData on the wire, with the real content_type appended after the plaintext before encryption.