MongoDB C++ Driver mongocxx-3.6.7
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
25namespace mongocxx {
26MONGOCXX_INLINE_NAMESPACE_BEGIN
27
28class MONGOCXX_API client_encryption {
29 public:
39
44
62 bsoncxx::types::bson_value::value create_data_key(std::string kms_provider,
63 const options::data_key& opts = {});
64
82 const options::encrypt& opts);
83
98
99 private:
100 class MONGOCXX_PRIVATE impl;
101
102 std::unique_ptr<impl> _impl;
103};
104
105MONGOCXX_INLINE_NAMESPACE_END
106} // namespace mongocxx
107
108#include <mongocxx/config/postlude.hpp>
A variant owning type that represents any BSON type.
Definition: value.hpp:39
A view-only variant that can contain any BSON type.
Definition: view.hpp:44
Definition: client_encryption.hpp:28
client_encryption(options::client_encryption opts)
Creates a client_encryption object.
bsoncxx::types::bson_value::value encrypt(bsoncxx::types::bson_value::view value, const options::encrypt &opts)
Encrypts a BSON value with a given key and algorithm.
bsoncxx::types::bson_value::value decrypt(bsoncxx::types::bson_value::view value)
Decrypts an encrypted value (BSON binary of subtype 6).
~client_encryption() noexcept
Destroys a client_encryption.
Class representing options for the object managing explicit client-side encryption.
Definition: client_encryption.hpp:36
Class representing options for explicit client-side encryption.
Definition: encrypt.hpp:34
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24