You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build the [unit tests](https://github.com/contentauth/c2pa-c/tree/main/tests) by entering this `make` command:
106
+
Build the [unit tests](https://github.com/contentauth/c2pa-cpp/tree/main/tests) by entering this `make` command:
107
107
108
108
```
109
109
make test
@@ -115,8 +115,8 @@ API documentation generated by Doxygen is automatically built on each PR.
115
115
116
116
To generate API docs locally, these are the main files:
117
117
118
-
- Configuration file: `c2pa-c/Doxyfile`
119
-
- Script: `c2pa-c/scripts/generate_api_docs.sh`
118
+
- Configuration file: `c2pa-cpp/Doxyfile`
119
+
- Script: `c2pa-cpp/scripts/generate_api_docs.sh`
120
120
- Output directory: `docs/_build/html`
121
121
122
122
Install Doxygen if needed:
@@ -138,10 +138,10 @@ Open `_build/html/index.html` to see the results.
138
138
139
139
## License
140
140
141
-
This package is distributed under the terms of both the [MIT license](https://github.com/contentauth/c2pa-c/blob/main/LICENSE-MIT) and the [Apache License (Version 2.0)](https://github.com/contentauth/c2pa-c/blob/main/LICENSE-APACHE).
141
+
This package is distributed under the terms of both the [MIT license](https://github.com/contentauth/c2pa-cpp/blob/main/LICENSE-MIT) and the [Apache License (Version 2.0)](https://github.com/contentauth/c2pa-cpp/blob/main/LICENSE-APACHE).
142
142
143
143
Note that some components and dependent crates are licensed under different terms; please check the license terms for each crate and component for details.
144
144
145
145
### Contributions and feedback
146
146
147
-
We welcome contributions to this project. For information on contributing, providing feedback, and about ongoing work, see [Contributing](https://github.com/contentauth/c2pa-c/blob/main/CONTRIBUTING.md).
147
+
We welcome contributions to this project. For information on contributing, providing feedback, and about ongoing work, see [Contributing](https://github.com/contentauth/c2pa-cpp/blob/main/CONTRIBUTING.md).
| [`Settings(data, format)`](https://contentauth.github.io/c2pa-c/da/d96/classc2pa_1_1Settings.html#a695e6e8c5a8cf16e40d6522af1fc13dd) | Parse settings from a string. Format is `"json"` or `"toml"` |
445
-
| [`set(path, json_value)`](https://contentauth.github.io/c2pa-c/da/d96/classc2pa_1_1Settings.html#a13810c5df3183aa2b0132e3c7c8edd1c) | Set a value by dot-separated path (e.g., `"verify.verify_after_sign"`). Value must be JSON-encoded. Returns `*this` for chaining |
| [`update(data, format)`](https://contentauth.github.io/c2pa-c/da/d96/classc2pa_1_1Settings.html#a80a12a51569bd89cc18231c7c9c36242) | Merge configuration from a string with specified format |
448
-
| [`is_valid()`](https://contentauth.github.io/c2pa-c/da/d96/classc2pa_1_1Settings.html#add51c3e2ef459978be035b86803b338e) | Returns `true` if the object is valid (not moved-from) |
| [`Settings(data, format)`](https://contentauth.github.io/c2pa-cpp/da/d96/classc2pa_1_1Settings.html#a695e6e8c5a8cf16e40d6522af1fc13dd) | Parse settings from a string. Format is `"json"` or `"toml"` |
445
+
| [`set(path, json_value)`](https://contentauth.github.io/c2pa-cpp/da/d96/classc2pa_1_1Settings.html#a13810c5df3183aa2b0132e3c7c8edd1c) | Set a value by dot-separated path (e.g., `"verify.verify_after_sign"`). Value must be JSON-encoded. Returns `*this` for chaining |
| [`update(data, format)`](https://contentauth.github.io/c2pa-cpp/da/d96/classc2pa_1_1Settings.html#a80a12a51569bd89cc18231c7c9c36242) | Merge configuration from a string with specified format |
448
+
| [`is_valid()`](https://contentauth.github.io/c2pa-cpp/da/d96/classc2pa_1_1Settings.html#add51c3e2ef459978be035b86803b338e) | Returns `true` if the object is valid (not moved-from) |
Copy file name to clipboardExpand all lines: docs/intents.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,7 +209,7 @@ Enum values are in the global namespace:
209
209
210
210
### Using `set_intent`
211
211
212
-
Use the `Builder`[`set_intent`](https://contentauth.github.io/c2pa-c/da/db7/classc2pa_1_1Builder.html#ac3ca980a43f44c9349ac0d6de50a088c) method to specify the intent:
212
+
Use the `Builder`[`set_intent`](https://contentauth.github.io/c2pa-cpp/da/db7/classc2pa_1_1Builder.html#ac3ca980a43f44c9349ac0d6de50a088c) method to specify the intent:
Copy file name to clipboardExpand all lines: docs/usage.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ ifs.close();
43
43
44
44
The manifest JSON string defines the C2PA manifest to add to the file.
45
45
46
-
A sample JSON manifest is provided in [tests/fixtures/training.json](https://github.com/contentauth/c2pa-c/blob/main/tests/fixtures/training.json).
46
+
A sample JSON manifest is provided in [tests/fixtures/training.json](https://github.com/contentauth/c2pa-cpp/blob/main/tests/fixtures/training.json).
47
47
48
48
For example:
49
49
@@ -196,14 +196,14 @@ Trust affects manifest validation status: a manifest whose trust chain was verif
196
196
197
197
## More examples
198
198
199
-
The C++ example in [`examples/training.cpp`](https://github.com/contentauth/c2pa-c/blob/main/examples/training.cpp) uses the [JSON for Modern C++](https://json.nlohmann.me/) library class.
199
+
The C++ example in [`examples/training.cpp`](https://github.com/contentauth/c2pa-cpp/blob/main/examples/training.cpp) uses the [JSON for Modern C++](https://json.nlohmann.me/) library class.
200
200
201
201
Build and run the example by entering this `make` command:
202
202
203
203
```
204
204
make examples
205
205
```
206
206
207
-
This example adds the manifest [`tests/fixtures/training.json`](https://github.com/contentauth/c2pa-c/blob/main/tests/fixtures/training.json) to the image file [`tests/fixtures/A.jpg`](https://github.com/contentauth/c2pa-c/blob/main/tests/fixtures/A.jpg) using the sample private key and certificate in the [`tests/fixtures`](https://github.com/contentauth/c2pa-c/tree/main/tests/fixtures) directory.
207
+
This example adds the manifest [`tests/fixtures/training.json`](https://github.com/contentauth/c2pa-cpp/blob/main/tests/fixtures/training.json) to the image file [`tests/fixtures/A.jpg`](https://github.com/contentauth/c2pa-cpp/blob/main/tests/fixtures/A.jpg) using the sample private key and certificate in the [`tests/fixtures`](https://github.com/contentauth/c2pa-cpp/tree/main/tests/fixtures) directory.
208
208
209
209
The example displays some text to standard out that summarizes whether AI training is allowed based on the specified manifest and then saves the resulting image file with attached manifest to `build/examples/training.jpg`.
|[**Manifest store**](#manifest-store)| Final signed provenance data. Contains one or more manifests. | Embedded in asset or remotely in cloud |[`Reader`](https://contentauth.github.io/c2pa-c/d9/dbb/classc2pa_1_1Reader.html) class |
8
-
|[**Working store**](#working-store)| Editable in-progress manifest. |`Builder` object |[`Builder`](https://contentauth.github.io/c2pa-c/da/db7/classc2pa_1_1Builder.html) class |
9
-
|[**Archive**](#archive)| Serialized working store |`.c2pa` file/stream |[`Builder::to_archive()`](https://contentauth.github.io/c2pa-c/da/db7/classc2pa_1_1Builder.html#a68074eac71b7fc57d338019220101db3)<br/> [`Builder::from_archive()`](https://contentauth.github.io/c2pa-c/da/db7/classc2pa_1_1Builder.html#a913c64f6b5ec978322ef0edc89e407b3)|
10
-
|[**Resources**](#working-with-resources)| Binary assets referenced by manifest assertions, such as thumbnails or ingredient thumbnails. | In manifest. |[`Builder::add_resource()`](https://contentauth.github.io/c2pa-c/da/db7/classc2pa_1_1Builder.html#a45bf6fc8163b0194b334aa21f73f8476) <br/> [`Reader::get_resource`](https://contentauth.github.io/c2pa-c/d9/dbb/classc2pa_1_1Reader.html#a308939c990cab98bf8435c699bc96096)|
11
-
| [**Ingredients**](#working-with-ingredients) | Source materials used to create an asset. | In manifest. | [`builder.add_ingredient`](https://contentauth.github.io/c2pa-c/da/db7/classc2pa_1_1Builder.html#a49407f9604a53b5b68bcfa699cba05f5)
7
+
|[**Manifest store**](#manifest-store)| Final signed provenance data. Contains one or more manifests. | Embedded in asset or remotely in cloud |[`Reader`](https://contentauth.github.io/c2pa-cpp/d9/dbb/classc2pa_1_1Reader.html) class |
8
+
|[**Working store**](#working-store)| Editable in-progress manifest. |`Builder` object |[`Builder`](https://contentauth.github.io/c2pa-cpp/da/db7/classc2pa_1_1Builder.html) class |
9
+
|[**Archive**](#archive)| Serialized working store |`.c2pa` file/stream |[`Builder::to_archive()`](https://contentauth.github.io/c2pa-cpp/da/db7/classc2pa_1_1Builder.html#a68074eac71b7fc57d338019220101db3)<br/> [`Builder::from_archive()`](https://contentauth.github.io/c2pa-cpp/da/db7/classc2pa_1_1Builder.html#a913c64f6b5ec978322ef0edc89e407b3)|
10
+
|[**Resources**](#working-with-resources)| Binary assets referenced by manifest assertions, such as thumbnails or ingredient thumbnails. | In manifest. |[`Builder::add_resource()`](https://contentauth.github.io/c2pa-cpp/da/db7/classc2pa_1_1Builder.html#a45bf6fc8163b0194b334aa21f73f8476) <br/> [`Reader::get_resource`](https://contentauth.github.io/c2pa-cpp/d9/dbb/classc2pa_1_1Reader.html#a308939c990cab98bf8435c699bc96096)|
11
+
| [**Ingredients**](#working-with-ingredients) | Source materials used to create an asset. | In manifest. | [`builder.add_ingredient`](https://contentauth.github.io/c2pa-cpp/da/db7/classc2pa_1_1Builder.html#a49407f9604a53b5b68bcfa699cba05f5)
12
12
13
13
This diagram summarizes the relationships among these entities.
14
14
@@ -67,7 +67,7 @@ A _C2PA archive_ (or just _archive_) contains the serialized bytes of a working
67
67
**Characteristics:**
68
68
69
69
- Portable serialization of a working store (Builder).
70
-
- Save an archive by using [`Builder::to_archive()`](https://contentauth.github.io/c2pa-c/da/db7/classc2pa_1_1Builder.html#a68074eac71b7fc57d338019220101db3) and restore a full working store from an archive by using [`Builder::from_archive()`](https://contentauth.github.io/c2pa-c/da/db7/classc2pa_1_1Builder.html#a913c64f6b5ec978322ef0edc89e407b3).
70
+
- Save an archive by using [`Builder::to_archive()`](https://contentauth.github.io/c2pa-cpp/da/db7/classc2pa_1_1Builder.html#a68074eac71b7fc57d338019220101db3) and restore a full working store from an archive by using [`Builder::from_archive()`](https://contentauth.github.io/c2pa-cpp/da/db7/classc2pa_1_1Builder.html#a913c64f6b5ec978322ef0edc89e407b3).
71
71
- Useful for separating manifest preparation ("work in progress") from final signing.
72
72
73
73
For more information, see [Working with archives](#working-with-archives)
@@ -236,7 +236,7 @@ auto builder = c2pa::Builder(custom_context, manifest_json);
236
236
237
237
### Creating a Signer
238
238
239
-
For testing, create a [`Signer`](https://contentauth.github.io/c2pa-c/d3/da1/classc2pa_1_1Signer.html) with certificates and private key:
239
+
For testing, create a [`Signer`](https://contentauth.github.io/c2pa-cpp/d3/da1/classc2pa_1_1Signer.html) with certificates and private key:
0 commit comments