Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

EncodeQuicLongHeader

function EncodeQuicLongHeader(aKind: tQuicPacketKind; aVersion: Cardinal; const aDestinationID, aSourceID, aToken: TBytes; aPacketNumber: UInt64; aPacketNumberLen, aCiphertextLen: Integer): TBytes;
Header encoders return unprotected headers including truncated packet numbers. aCiphertextLen includes the AEAD tag, excluding the packet number. The caller selects a safe truncation length and supplies packet protection. Only Initial, 0-RTT and Handshake are accepted by the long-header encoder. aToken is permitted only for Initial. Invalid arguments raise eQuicError.