Overview
Stores and retrieves C2PA Manifest Stores in WARC 1.1 files (ISO 28500). The manifest is stored as a WARC resource record with Content-Type: application/c2pa, appended at the end of the file.
WARC is used by national libraries, legal deposit systems, and digital preservation institutions to archive web content. This crate enables content provenance for archived web resources.
Zero dependencies.
Quick Start
[]
= "0.1"
Append a manifest
use append_manifest;
let warc_data: & = /* existing WARC file bytes */;
let manifest: & = /* C2PA manifest store bytes */;
let signed = append_manifest.unwrap;
Read a manifest
use read_manifest;
let manifest = read_manifest.unwrap;
Multiple manifests
When a WARC file contains multiple C2PA manifest records (e.g., after concatenation), the last record is used as the active manifest. Pre-existing manifest records are preserved, and their hashes become valid again if the file is split back into its original constituents.
Design
- Manifest stored as a WARC
resourcerecord - Content hashing via collection data hash over entire WARC records (headers + body)
- Supports per-record gzip compression (hashes compressed bytes)
- Append-only; no two-pass workflow required
- Multiple manifests allowed; last record is active
Related Crates
| Crate | Description |
|---|---|
| c2pa-structured-text | Structured text embedding via ASCII armour delimiters |
| c2pa-vtt | WebVTT subtitle embedding |
| c2pa-text-binding | Soft binding and content fingerprinting for text assets |
| c2pa-rs | Official C2PA SDK |
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Built by WritersLogic