See Release tag 0.6.0.
New features:
- Allow EC signatures in DER format from signers and verify signature format during validation.
- Fix bug in signing audio and video files in ISO Base Media File Format (BMFF).
- Add the ability to verify PDF files (but not to sign them).
- Increase speed of
sign_file
by 2x or more, when using file paths (uses native Rust file I/O). - Fixes for RIFF and GIF formats.
New features in this release:
- Rewrites the API to be stream-based using a Builder / Reader model.
- The functions now support throwing
c2pa.Error
values, caught withtry
/except
. - Instead of
c2pa.read_file
you now callc2pa_api.Reader.from_file
andreader.json
. - Read thumbnails and other resources use
reader.resource_to_stream
orreader.resource.to_file
. - Instead of
c2pa.sign_file
usec2pa_api.Builder.from_json
andbuilder.sign
orbuilder.sign_file
. - Add thumbnails or other resources with
builder.add_resource
orbuilder.add_resource_file
. - Add Ingredients with
builder.add_ingredient
orbuilder.add_ingredient_file
. - You can archive a
Builder
usingbuilder.to_archive
and reconstruct it withbuilder.from_archive
. - Signers can be constructed with
c2pa_api.create_signer
. - The signer now requires a signing function to keep private keys private.
- Example signing functions are provided in c2pa_api.py
This release:
- Changes the name of the import from
c2pa-python
toc2pa
. - Supports pre-built platform wheels for macOS, Windows and manylinux.
This release includes some breaking changes to align with future APIs:
C2paSignerInfo
moves thealg
to the first parameter from the 3rd.c2pa.verify_from_file_json
is nowc2pa.read_file
.c2pa.ingredient_from_file_json
is nowc2pa.read_ingredient_file
.c2pa.add_manifest_to_file_json
is nowc2pa.sign_file
.- There are many more specific errors types now, and Error messages always start with the name of the error i.e (str(err.value).startswith("ManifestNotFound")).
- The ingredient thumbnail identifier may be jumbf uri reference if a valid thumb already exists in the active manifest.
- Extracted file paths for read_file now use a folder structure and different naming conventions.