Download the PHP package provemark/content-credentials without Composer

On this page you can find all versions of the php package provemark/content-credentials. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package content-credentials

Content Credentials

CI Latest Version

A PHP library for C2PA Content Credentials: build, sign, read and verify manifests for media assets. Its primary purpose is the machine-readable marking of AI-generated content required by the EU AI Act, Article 50 — a c2pa.actions.v2 / c2pa.created assertion with digitalSourceType = trainedAlgorithmicMedia.

Article 50(2) covers content that is generated or manipulated, and both are supported. Marking manipulation takes one extra argument — the original asset — because C2PA records an edit as a c2pa.opened action pointing at an ingredient whose hash covers the original's bytes, not a filename or a digest you can supply instead. See What you can mark.

Signed metadata is only the first of two layers the EU's Code of Practice asks for — see Going to production before treating this as compliance.

It ships as two pieces:

The private signing key never touches your web application. Signing is delegated to a small Node signing service (service/, based on @contentauth/c2pa-node) that you run separately — keeping the signing key isolated from the app process. (This is the deliberate trade-off versus an in-process native extension, which puts the key on the web server.)

Reading needs none of that. Extracting the C2PA metadata from a file you did not sign — inspecting what the credential claims, checking whether an image is marked as AI-generated, verifying the signature — needs no private key and no certificate. With the in-process reader installed it needs no service either: see Reading and verifying.

Listed as the PHP library under External projects in the Content Authenticity Initiative's community resources. That is a listing, not a conformance claim — see Going to production for what the C2PA Conformance Program covers and why no library can appear on the Conforming Products List.

Status: this is a spec-driven rebuild of a proven end-to-end spike. The design, decisions and trade-offs are documented in specs/, docs/ and NOTES.md.

Requirements

Quickstart

Ten minutes from nothing to a signed image you can verify. Two pieces are involved: a signing service that holds the private key, and the PHP library that talks to it. The service comes first — without it, the library has nothing to call.

1. Run the signing service

It lives in this repository, not in the Composer package, so clone the repo:

You should see {"status":"ok","signing_alg":"es256",...}. If not, stop here — nothing below will work.

2. Install the library in your application

In Laravel the service provider and facade register automatically. Point it at the service with the same secret you generated above:

3. Sign an image

⚠️ Write those bytes as they are. Any re-encode, resize, optimiser or CDN image transform invalidates the credential — the signature covers the file's bytes. This is the single most common way a working integration breaks, and it fails silently: the image still displays, the credential is simply gone.

4. Check that it worked

Or from the repository, using the authoritative tool:

Cert trusted: PASS here means the bundled test anchors trust the bundled test certificate — bin/verify.sh passes them to c2patool deliberately. A public verifier, using the production trust list, will say untrusted. That is correct and expected; see below.

What you have, and what you do not

The signature is cryptographically valid, and the image carries the EU AI Act Article 50 marking: a c2pa.actions.v2 assertion with digitalSourceType = trainedAlgorithmicMedia.

What you do not have yet is a certificate anyone else trusts. The bundled one is c2pa-rs test material — public verifiers will report the signature as valid and the certificate as untrusted. Replacing it is the one step between this and production; see Going to production.

Reading C2PA metadata from an existing file

Extracting and inspecting the C2PA metadata in a file — yours or anyone's — needs no key, no certificate and, with the in-process reader, no service:

A file with no credential is not an error: hasManifest() returns false and the rest of the report answers accordingly. Reading through the signing service instead needs no extension and is the default; in Laravel either one is a facade call, plus php artisan content-credentials:read <file>. Which engine answers, how to check the certificate against a trust list, and what each route costs is on Reading and verifying.

Where the rest lives

The quickstart above is the whole of the happy path. Everything else has its own page, so this one stays readable:

Page What is on it
Usage Building manifests, signing and reading — Laravel and plain PHP, configuration, the facade, jobs and commands
What you can mark The thirteen media types, the digitalSourceType terms, what each one actually claims, and marking manipulated content
Reading and verifying Reading C2PA metadata with or without the signing service, binding the in-process reader, trust anchors, and the trade-off between the two
Running the signing service Audit logging, rate limits, sizing the container, assertion limits, rotating the key
Going to production Certificates a public verifier will trust, trust-list verification, C2PA Conformance Program alignment
Stability and support What is public API, which PHP and Laravel versions are supported, the deprecation policy, and what 1.0 would require

Deeper background: docs/c2pa-primer.md for the domain rules this package is built on, and docs/adr/ for the decisions that shaped it.

Verifying the output

bin/verify.sh runs c2patool with the test trust settings and reports signature validity, cert trust and the AI marking:

Note: test certificates produce a cryptographically valid signature but are not on any production trust list — "valid signature" is not the same as "trusted certificate". See docs/c2pa-primer.md §5.

Development

composer check is the single definition of green. The architecture boundary (Core must not depend on Laravel/Illuminate) is enforced by Deptrac.

To exercise the whole chain against a running service with the real library code (build → sign → read → c2patool verify):

Security

License

MIT © Maurice van Loon


All versions of content-credentials with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
php-http/discovery Version ^1.20
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
psr/http-message Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package provemark/content-credentials contains the following files

Loading the files please wait ...