MongoDB C++ Driver  mongocxx-3.7.0
client_encryption.hpp
1 // Copyright 2020 MongoDB Inc.
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 #pragma once
16 
17 #include <bsoncxx/types/bson_value/value.hpp>
18 #include <bsoncxx/types/bson_value/view.hpp>
19 #include <mongocxx/options/client_encryption.hpp>
20 #include <mongocxx/options/data_key.hpp>
21 #include <mongocxx/options/encrypt.hpp>
22 
23 #include <mongocxx/config/prelude.hpp>
24 
25 namespace mongocxx {
26 MONGOCXX_INLINE_NAMESPACE_BEGIN
27 
31 class MONGOCXX_API client_encryption {
32  public:
42 
46  ~client_encryption() noexcept;
47 
52 
57 
58  client_encryption(const client_encryption&) = delete;
59  client_encryption& operator=(const client_encryption&) = delete;
60 
78  bsoncxx::types::bson_value::value create_data_key(std::string kms_provider,
79  const options::data_key& opts = {});
80 
98  const options::encrypt& opts);
99 
114 
115  private:
116  class MONGOCXX_PRIVATE impl;
117 
118  std::unique_ptr<impl> _impl;
119 };
120 
121 MONGOCXX_INLINE_NAMESPACE_END
122 } // namespace mongocxx
123 
124 #include <mongocxx/config/postlude.hpp>
mongocxx::options::client_encryption
Class representing options for the object managing explicit client-side encryption.
Definition: client_encryption.hpp:36
mongocxx
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24
mongocxx::options::encrypt
Class representing options for explicit client-side encryption.
Definition: encrypt.hpp:34
mongocxx::options::data_key
Class representing options for data key generation for encryption.
Definition: data_key.hpp:36
mongocxx::client_encryption
Class supporting operations for MongoDB Client-Side Field Level Encryption.
Definition: client_encryption.hpp:31
bsoncxx::types::bson_value::value
A variant owning type that represents any BSON type.
Definition: value.hpp:44
bsoncxx::types::bson_value::view
A view-only variant that can contain any BSON type.
Definition: view.hpp:44