Skip to main content

Crate encypher_c2pa

Crate encypher_c2pa 

Source
Expand description

Local-first, verification-only C2PA SDK.

The public facade reads caller-provided bytes and reports integrity separately from trust. Network access occurs only after saved failure telemetry consent or an explicit per-call override.

Structs§

DetachedManifestEvidence
Raw, read-only evidence needed to validate an embedded manifest remotely without uploading the host asset.
FreshnessReport
NetworkReport
What a verification did, or could have done, on the network.
NetworkRequest
One attempted fetch.
RevocationReport
SegmentReport
One per-segment stream position, verified as a standalone asset.
StreamVerificationReport
Result of verify_stream.
TelemetryOptions
Per-verification override for persisted failure telemetry consent.
TrustReport
ValidationFailureTelemetry
Privacy-bounded validation failure report. It contains no asset bytes, manifest data, filenames, URLs, keys, trust material, or stable identifiers.
ValidationResults
VerificationReport
VerificationStatus
VerifyOptions

Enums§

Error
OnlinePreference
The saved answer to “may this machine fetch what a file references?”.
OnlinePreferenceError
StreamEncapsulation
How a fragmented stream is packaged.
StreamMethod
The C2PA protection method applied to a fragmented stream.
TelemetryPreferenceError

Constants§

C2PA_PROFILE
DEFAULT_TELEMETRY_ENDPOINT
DEFAULT_TRUST_SNAPSHOT_DATE
REPORT_SCHEMA_VERSION
SUPPORTED_EXTENSIONS
Every filename extension the SDK maps to a MIME type, with its mapping.

Functions§

allow_interactive_online_consent
Let this process ask the operator before it fetches anything.
config_directory
The directory holding this SDK’s saved preferences for the current operating-system account, or None when none can be resolved (containers, service accounts, HOME-less shells).
detached_manifest_evidence
Extract the signed manifest store and its contiguous carrier for detached server validation.
mime_from_path
Infer a MIME type from a filename extension, case-insensitively.
online_preference
The effective saved choice. ENCYPHER_C2PA_ONLINE is an operator override and wins over the file; it accepts only on and off, because an operator setting an environment variable on a service has nobody to ask.
prompt_for_telemetry_consent
Ask for consent on the first interactive verification and persist the answer. Non-interactive processes return None and remain disabled.
set_online_preference
Persist the online choice for later runs of every terminal surface used by this operating-system account.
set_telemetry_enabled
Persist the telemetry preference for subsequent verifications by every native Encypher C2PA binding used by this operating-system account.
supported_mime_types
Canonical MIME types covered by the C2PA 2.4 profile and readable by this build.
telemetry_preference
Return the effective saved preference. An environment override takes precedence over the per-user configuration file.
validation_failure_telemetry
verify
Verify asset bytes with default options. Parsing and validation stay offline; saved failure-telemetry consent may emit one bounded request. For guaranteed no egress, disable the telemetry feature or call verify_with_options with telemetry.enabled set to Some(false).
verify_file
Read and verify one local asset.
verify_fragmented
Verify a fragmented ISO BMFF stream with default options.
verify_fragmented_with_options
Verify a fragmented ISO BMFF stream with explicit trust, validation-time, CAWG, and telemetry options.
verify_stream
Verify a fragmented ISO BMFF stream under a declared encapsulation and protection method, with default options.
verify_stream_with_options
Verify a fragmented ISO BMFF stream with explicit trust, validation-time, and CAWG options.
verify_with_manifest_store
Verify one asset against a manifest store the caller supplies separately.
verify_with_options
Verify asset bytes against the bundled trust snapshots plus any static trust material supplied by the caller. Failure telemetry follows the explicit override or saved per-user preference.