Introduction
Truepic's core C2PA C++ library
The Truepic C2PA library, called libc2pa, is a proprietary library built for enterprises, written in C++ to perform C2PA signing and validation operations on media files.
Target Environments
Truepic's CI workflows currently build and test libc2pa
the following platforms:
- MacOS 13 (x86_64 and aarch64)
- Ubuntu 20.04 (x86_64)
- Amazon Linux 2 (x86_64)
- Web Assembly (for browsers and Node.js)
- Android
- iOS
We have also built for other platforms, including Arch Linux and Windows. Other platforms may be added upon request.
Bindings
Bindings are available for C, C#, Java, JavaScript, and Rust integrations. Those bindings are not currently documented here, but more information can be provided upon request.
Current State
The library is in active development. New features are being added regularly. Some features in the library are in an experimental state, or even incomplete. Some features may be removed in future versions. Up until now, the library has been developed with a "functionality-first" mentality. Performance has been a secondary consideration. As such, there are likely many unexplored opportunities to improve the library's performance.
The library is on the 5th iteration of its interface (v5
). The v4
interface is still supported, but is deprecated. Interfaces older than v4
are no longer supported in the library. See Signing v4 and Validation v4 for documentation on the v4
interface.
Example Code
There are a couple of example binaries that provide a pretty good model for how to use the libc2pa
interface:
examples/example.cpp
- Shows how to use a buffer "flavor" of theClaimGenerator
to sign a JPEG image.examples/example_mp4.cpp
- Shows how to use a file "flavor" of theClaimGenerator
to sign an MP4 video.
Updated 3 months ago