Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodtQuicPacketProtection.HeaderInfo

function HeaderInfo(const aPacket: TBytes; aPacketNumberOffset: Integer; aExpectedPacketNumber: UInt64; out aFirstByte: Byte; out aPacketNumber: UInt64): Boolean;
aPacket contains exactly one packet, already split from any coalesced datagram. aPacketNumberOffset is relative to aPacket. Output variables must be distinct from each other and the input variable. Separate variables may share an array; their bytes remain unmodified. Successful outputs are independent arrays. Failure explicitly returns empty arrays and packet number zero; unauthenticated plaintext is never published. Header structure and reserved bits are the transport's responsibility. Reserved bits must be checked after authentication. Header-only inspection is unauthenticated and must have no transport effects. It uses the unchanged header protection key to select an already prepared packet key. Failure explicitly returns zero outputs.