1 // Copyright 2023 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // 15 //////////////////////////////////////////////////////////////////////////////// 16 17 #ifndef TINK_CONFIGURATION_H_ 18 #define TINK_CONFIGURATION_H_ 19 20 #include "tink/internal/key_type_info_store.h" 21 #include "tink/internal/keyset_wrapper_store.h" 22 23 namespace crypto { 24 namespace tink { 25 26 namespace internal { 27 class ConfigurationImpl; 28 } 29 30 // Configuration used to generate primitives using stored primitive wrappers and 31 // key type managers. 32 class Configuration { 33 public: 34 Configuration() = default; 35 36 // Not copyable or movable. 37 Configuration(const Configuration&) = delete; 38 Configuration& operator=(const Configuration&) = delete; 39 40 private: 41 friend class internal::ConfigurationImpl; 42 43 // When true, Configuration is in global registry mode. For `some_fn(config)` 44 // with a `config` parameter, this indicates to `some_fn` to use 45 // crypto::tink::Registry directly. 46 bool global_registry_mode_ = false; 47 48 crypto::tink::internal::KeyTypeInfoStore key_type_info_store_; 49 crypto::tink::internal::KeysetWrapperStore keyset_wrapper_store_; 50 }; 51 52 } // namespace tink 53 } // namespace crypto 54 55 #endif // TINK_CONFIGURATION_H_ 56