| // Copyright 2026 Google LLC | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // https://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| // | |
| #ifndef THIRD_PARTY_CREDENTIO_GENERATOR_GENERATOR_OPTIONS_H_ | |
| #define THIRD_PARTY_CREDENTIO_GENERATOR_GENERATOR_OPTIONS_H_ | |
| #include "absl/base/nullability.h" | |
| #include "assertion/assertion_cbor_encoder.h" | |
| #include "claim/claim_cbor_encoder.h" | |
| #include "claim/generator.h" | |
| #include "claim/signer.h" | |
| #include "constants/spec_version.h" | |
| #include "crypto/default/hasher.h" | |
| #include "crypto/hash.h" | |
| #include "generator/manifest_store_transformer.h" | |
| #include "proto/generator_info.pb.h" | |
| #include "salt/random_salt_generator.h" | |
| #include "salt/salt_generator.h" | |
| #include "uuid/uuid.h" | |
| namespace credentio { | |
| // Options for creating a ManifestStoreGenerator. | |
| struct GeneratorOptions { | |
| // Required. | |
| GeneratorInfo generator_info; | |
| // Required. Must outlive the created generator. | |
| ClaimSigner* signing_claim_signer = nullptr; | |
| // Required. Must outlive the created generator. | |
| ClaimSigner* template_claim_signer = nullptr; | |
| // Optional. If provided, must outlive the created generator. | |
| const UuidGenerator* absl_nonnull uuid_generator = &UuidGenerator::Default(); | |
| // Optional. If provided, must outlive the created generator. | |
| const HasherFactory* absl_nonnull hash_factory = &DefaultHasherFactory(); | |
| // Optional. If provided, must outlive the created generator. | |
| const AssertionCborEncoder* assertion_cbor_encoder = nullptr; | |
| // Optional. If provided, must outlive the created generator. | |
| const ClaimCborEncoder* claim_cbor_encoder = nullptr; | |
| // Optional. If provided, must outlive the created generator. | |
| const ManifestStoreTransformer* manifest_store_transformer = nullptr; | |
| // Optional. | |
| ManifestAssemblerFactory manifest_assembler_factory = CreateManifestAssembler; | |
| // The C2PA specification version the generated manifests conform to. | |
| SpecVersion spec_version = SpecVersion::kC2pa_2_2; | |
| // Optional. Salts every assertion; use `SaltGenerator::NoOp()` to disable | |
| // salting. If provided, must outlive the created generator. | |
| const SaltGenerator* absl_nonnull salt_generator = | |
| &RandomSaltGenerator::Default(); | |
| }; | |
| } // namespace credentio | |
| #endif // THIRD_PARTY_CREDENTIO_GENERATOR_GENERATOR_OPTIONS_H_ |