CML
    Preparing search index...

    Function validateC2paSegment

    • Validates a C2PA live stream segment using the VSI/EMSG method (§19.7.3).

      Extracts the EMSG box, decodes the COSE_Sign1 and VSI map, matches the session key by kid, then performs all cryptographic checks: signature verification, BMFF content hash, sequence number floor, and key validity.

      Returns null if the segment does not contain a C2PA EMSG box.

      Parameters

      Returns Promise<
          | { nextSequenceState: SequenceState; result: SegmentValidationResult }
          | null,
      >

      Validation result and updated sequence state, or null if no C2PA EMSG box

      it('returns null when segment has no C2PA EMSG box', async () => {
      const result = await validateC2paSegment(
      new Uint8Array(0),
      [],
      )

      strictEqual(result, null)
      })