HPDFValidateSignatureByteRange
function HPDFValidateSignatureByteRange(Source: TStream; const AByteRange: array of Int64; out SignedRevisionLength, UnsignedTrailingBytes: Int64): Boolean;
HPDFSignatureByteRanges contains the existing shared validator used by the Windows verifier and the portable CMS layer
Ranges must contain either one pair covering the complete 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 the end of the last covered range and UnsignedTrailingBytes reports the suffix beyond that signed revision
Failure returns false and clears both output lengths; this helper checks arithmetic and coverage but does not parse PDF Contents or verify a CMS signature