HPDFValidateSignatureByteRange
function HPDFValidateSignatureByteRange(Source: TStream; const AByteRange: array of Int64; out SignedRevisionLength, UnsignedTrailingBytes: Int64): Boolean;
HPDFSignatureByteRanges holds the existing shared validator used by the Windows verifier and the portable CMS layer
Ranges must contain either a single pair covering the whole stream or two ordered pairs starting at zero with a nonempty excluded interval; negative lengths, overlap, arithmetic overflow and out-of-bounds positions are rejected
For a valid two-pair range, SignedRevisionLength reports where the last covered range ends and UnsignedTrailingBytes reports the suffix beyond that signed revision
Failure returns false and clears both output lengths; this helper checks the arithmetic and coverage but parses no PDF Contents and verifies no CMS signature