1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Copyright 2026 WritersLogic. All rights reserved.
// Licensed under the Apache License, Version 2.0 or the MIT license,
// at your option.
//! C2PA manifest embedding, hard binding, and validation for structured text.
//!
//! Implements the *Embedding Manifests into Structured Text* section of the
//! C2PA Technical Specification, which associates a C2PA Manifest Store with
//! source code, configuration files, markup, and other text formats that
//! support comment syntax or front matter conventions.
//!
//! The manifest block uses fixed ASCII armour-style delimiters:
//! `-----BEGIN C2PA MANIFEST-----` and `-----END C2PA MANIFEST-----`.
//!
//! # Scope
//!
//! This crate owns three things:
//!
//! - **Embed** ([`embed_manifest`], [`embed_manifest_at_end`],
//! [`embed_front_matter`]) a reference or an inline manifest as a comment or
//! front matter block.
//! - **Extract** ([`extract_manifest`], [`classify_reference`]) the block and
//! resolve its reference.
//! - The **hard binding** ([`hardbinding`]): the exact `c2pa.hash.data`
//! coverage over the normalized-free raw byte stream, with the manifest block
//! excluded, plus compute and verify.
//!
//! Signature verification, certificate trust, and assertion validation are
//! **not** implemented here; the [`bridge`] (feature `c2pa`) delegates them to
//! `c2pa-rs`.
//!
//! # Features
//!
//! - `hard-binding` — concrete SHA2-256/384/512 [`hardbinding::compute_data_hash`]
//! and [`hardbinding::verify_data_hash`] (pulls `sha2`). The exclusion-range
//! and covered-byte primitives ([`hardbinding::manifest_exclusion`],
//! [`hardbinding::hashed_bytes`]) are always available and dependency-free.
//! - `c2pa` — the [`bridge`] to `c2pa-rs` for signature/trust/assertion validation.
//! - `remote` — HTTP(S) resolution of URL references in the bridge (pulls `ureq`).
//! - `wasm` — JS/WASM bindings for the npm package (pulls `wasm-bindgen`).
//! - `python` — Python bindings for the PyPI wheel (pulls `pyo3`, built with maturin).
//!
//! No feature is enabled by default; the core embed/extract/binding-range API
//! has no dependencies.
pub use ;
pub use Error;
pub use ;