dtls13RecordAad

fnubyte[13] dtls13RecordAad(ubyte contentType, ushort epoch, ulong sequenceNumber, ushort payloadLength) pure nothrow @safe @nogc

Builds the AEAD additional data for a DTLS 1.3 record.

Per RFC 9147 §4, the entire record header is used as the AEAD additional data. The header (and thus the AAD) is 13 bytes in wire order:

content_type (1) || version (2) || epoch (2) || sequence_number (6) || length (2)

Parameters

contentTypeThe record content type.
epochThe record epoch.
sequenceNumberThe 48-bit record sequence number.
payloadLengthThe encrypted payload length (ciphertext + tag).

Returns

The 13-byte additional data.