Package com.bfo.box

Class C2PAManifest


public class C2PAManifest extends JUMBox

The manifest box represents a signed sequence of assertions. There is at least one manifest for any store box. A valid manifest has one or more assertions, a claim box which lists some or all of those assertions along with some additional metadata, and a signature box which signs the claim.

Since:
5
See Also:
  • Constructor Details

    • C2PAManifest

      public C2PAManifest()
      Create a new uninitialized box, for loading. Don't call this constructor
    • C2PAManifest

      public C2PAManifest(String uuid)
      Create a new C2PAManifest
      Parameters:
      uuid - the UUID, which must not be null
  • Method Details

    • setInputStream

      public void setInputStream(InputStream in)
      Verifying C2PA requires verifying the data - this method need to be called before verifying the assertions returned by getAssertions() to supply that data.
      Parameters:
      in - the InputStream to read from
    • getInputStream

      public InputStream getInputStream()
      Retrieves the InputStream set by setInputStream(java.io.InputStream) and clears it. Calling the method a second time will return null.
      Returns:
      the InputStream to read from
    • getAssertions

      public List<C2PA_Assertion> getAssertions()
      Return a live list of assertions, which can be edited.
      Returns:
      the assertion list
    • getClaim

      public C2PAClaim getClaim()
      Return the claim object, creating it if required
      Returns:
      the claim
    • getSignature

      public C2PASignature getSignature()
      Return the signature object, creating it if required
      Returns:
      the signature