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§

CawgTrustConfiguration
One entry of the CAWG Identity 1.3 trust configuration a caller supplies.
DetachedManifestEvidence
Raw, read-only evidence needed to validate an embedded manifest remotely without uploading the host asset.
ErtmpConnectionContext
Caller-supplied E-RTMP capability negotiation assertions.
ErtmpInput
Ordered input to E-RTMP verification.
ErtmpManifestReport
One manifest first exercised by an E-RTMP segment.
ErtmpSegmentReport
Result for one closed logical E-RTMP segment.
ErtmpTrack
One E-RTMP track. An absent wire trackId is represented as zero.
ErtmpVerificationReport
Result of verify_ertmp_with_options.
ErtmpWireError
A framing or media-packet defect. Every defect is fatal: malformed input is never converted into a partial event stream.
ErtmpWireEventContext
Wire identity for one media-derived verifier event.
ErtmpWireInput
Parsed verifier input plus wire identity for every event.
ErtmpWireLimits
Hard bounds applied before allocating from untrusted wire lengths.
ExternalDidDocumentRequest
One DID document a network adapter may resolve before final verification.
ExternalResourcePlan
A parse-only, bounded external-resource discovery session.
ExternalResourceRequest
One external URI the caller may resolve before final verification.
FlvWireOptions
FLV has no chunk-stream identity, so callers must provide the IDs from the RTMP connection that the file/tag trace represents.
FreshnessReport
GraphInputs
Caller-supplied resource provider and ceilings for graph validation.
GraphLimits
Resource ceilings for one verification graph.
LocalEvidence
One local verification plus what a service needs to re-verify the same manifest store without receiving the asset.
LocalHardBinding
The hard binding a LocalEvidence pass checked.
ManifestDigest
One manifest of a store and its expanded-domain SHA-256, the digest an ingredient’s activeManifest reference to it carries.
NetworkReport
What a verification did, or could have done, on the network.
NetworkRequest
One attempted fetch.
RecoveredSoftBindingManifest
A fetched manifest store and its ordinary local C2PA verification report.
RevocationReport
RtmpWireConnection
One complete publisher-to-server RTMP connection after its handshake.
SegmentReport
One per-segment stream position, verified as a standalone asset.
SoftBindingAlgorithm
One registered algorithm returned by a service.
SoftBindingAlgorithms
Algorithms a service accepts for query operations.
SoftBindingCapabilities
Service capability document. Unknown capability names remain visible.
SoftBindingDiscovery
Service discovery document.
SoftBindingFetchRequest
One bounded read-only request emitted by SoftBindingResolverSession.
SoftBindingMatch
One query match from a local or federated repository.
SoftBindingReceiptEvidence
Repository-reported receipt evidence. server_reported_verified is not a local cryptographic receipt verdict.
SoftBindingReceiptVerificationSession
Transport-independent session for the repository’s explicit receipt POST.
SoftBindingResolution
Complete evidence from one read-only resolution flow.
SoftBindingResolverOptions
Network and optional read-only evidence policy for soft-binding recovery.
SoftBindingResolverSession
Transport-independent Soft Binding Resolution API state machine.
StoreOnlyValidation
What one manifest store proves with no asset: claim, assertion, ingredient, signature, time-stamp, revocation, trust and identity validation, and nothing about content.
StreamVerificationReport
Result of verify_stream.
TelemetryOptions
Per-verification override for persisted failure telemetry consent.
TrustListSource
One caller-supplied trust list with provenance retained for C2PA 2.5 crJSON.
TrustReport
TrustSource
Provenance for the trust list that supplied an anchor configuration.
ValidatedExternalData
Caller-supplied external resource evidence decoded while validating all verification options.
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§

CawgTrustProfile
The CAWG Identity 1.3 rules a CawgTrustConfiguration is accepted under.
Error
ErtmpEvent
One caller-parsed E-RTMP event, in transmission order.
ErtmpMediaType
E-RTMP media type. Audio and video track-id namespaces are independent.
ExternalResource
What a caller-side retrieval attempt for one external hashed URI produced.
ExternalResourceKind
How final verification uses one discovered external resource.
ExternalResourceStopReason
Why discovery could not reach a complete resource frontier.
GraphLimitKind
The graph ceiling that stopped parse-only discovery.
OnlinePreference
The saved answer to “may this machine fetch what a file references?”.
OnlinePreferenceError
SoftBindingDisclosureConsent
Explicit consent carried by query variants that disclose asset material.
SoftBindingHttpMethod
HTTP method emitted by the transport-independent resolver.
SoftBindingQuery
One explicitly selected Soft Binding Resolution API query route.
StreamEncapsulation
How a fragmented stream is packaged.
StreamMethod
The C2PA protection method applied to a fragmented stream.
TelemetryPreferenceError

Constants§

C2PA_PROFILE
Report profile of the default C2PA 2.4 validation policy.
C2PA_PROFILE_2_2
Report profile of the explicitly selected C2PA 2.2 policy.
C2PA_PROFILE_2_5
Report profile of the explicitly selected C2PA 2.5 policy.
DEFAULT_TELEMETRY_ENDPOINT
DEFAULT_TRUST_SNAPSHOT_DATE
REPORT_SCHEMA_VERSION
SPEC_VERSIONS
Every value VerifyOptions::spec_version accepts. None means "2.4".
SUPPORTED_EXTENSIONS
Every filename extension the SDK maps to a MIME type, with its mapping.

Traits§

ExternalResources
Injected, network-free source of external hashed-URI resources.

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, locating it under the default C2PA 2.4 policy.
detached_manifest_evidence_with_options
detached_manifest_evidence under the policy options.spec_version selects. A 2.5 extraction therefore returns exactly the store and carrier span that a 2.5 verification reads.
ertmp_input_from_flv
Parse one complete FLV file into ordered verifier events.
ertmp_input_from_rtmp_connections
Parse complete post-handshake publisher-to-server RTMP connection traces. Each trace carries its own caller-supplied negotiation assertions and initial chunk size. A reconnect event is inserted between traces; chunk, message, and track-to-message-stream state resets at that point.
local_evidence_with_options
Verify asset bytes exactly as verify_with_options does and return the evidence a remote service needs to re-verify the same manifest store.
locate_external_resources
Discover external resources from the same embedded store selected by final verification under the caller-selected policy. Only spec_version and strict_conformance are consulted; trust, evidence, clocks, and cryptography belong to final verification.
locate_external_resources_with_manifest_store
Discover external resources from a caller-supplied initial store. The supplied store is authoritative even if asset also embeds one, matching crate::verify_with_manifest_store_and_graph_inputs. It is parsed during this call and is not retained by the returned plan. Only the caller’s policy and carrier selection are consulted.
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.
request_soft_binding_receipt_verification
Ask a repository to verify a caller-supplied receipt. The result remains server-reported evidence and is not a local cryptographic receipt verdict.
resolve_soft_binding
Discover, query, fetch and locally verify matching manifest stores through the native no-redirect transport.
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.
supported_mime_types_for
Canonical MIME types the caller-selected policy reads with an embedded manifest carrier. None is exactly "2.4". The finite 2.2 and 2.4 lists come from the shared format registry. "2.5" adds the standard ZIP package and generic-container names used by generator products, plus WARC, MIDI, TTML, ONNX, SafeTensors, Parquet, BlockFact, append-only JSON Lines, WebVTT and textual comment-syntax types. It also reads the OpenDocument family, other text/* types and +xml types by family, which no finite list can enumerate. Generic XML-comment embedding stays unreadable under 2.5 (upstream issue 2590), so XML types without a dedicated carrier are omitted. Any well-formed type can still be verified against a separately supplied store with verify_with_manifest_store.
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_ertmp
verify_ertmp_with_options with 2.5 selected and all other defaults kept.
verify_ertmp_with_options
Verify ordered E-RTMP events under the explicitly selected C2PA 2.5 policy.
verify_file
Read and verify one local asset.
verify_fragmented
Verify a fragmented ISO BMFF stream with default options.
verify_fragmented_with_graph_inputs
verify_fragmented_with_options with caller-controlled external resource resolution and lowered graph ceilings. The fragments, graph walk, and CAWG identity checks run in one verification pass without network I/O.
verify_fragmented_with_options
Verify a fragmented ISO BMFF stream with explicit trust, validation-time, CAWG, and telemetry options.
verify_manifest_store_only
Validate a manifest store on its own, with no asset.
verify_manifest_store_only_with_graph_inputs
verify_manifest_store_only with caller-controlled external resource resolution and lowered graph ceilings. Content remains deliberately unevaluated, so a valid result stays unbound.
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_graph_inputs
Verify with caller-controlled external resource resolution and lowered graph ceilings. Policy selection, trust defaults and all verdict logic are the same as verify_with_options; this function performs no network I/O.
verify_with_manifest_store
Verify one asset against a manifest store the caller supplies separately.
verify_with_manifest_store_and_graph_inputs
verify_with_manifest_store with caller-controlled external resource resolution and lowered graph ceilings. The manifest store and external resources are supplied by the caller; this function performs no network I/O and completes the graph and CAWG checks in one verification pass.
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.