⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

encrypt_record

Function encrypt_record 

Source
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.