MongoDB C++ Driver
mongocxx-3.11.0
Loading...
Searching...
No Matches
mongocxx
v_noabi
mongocxx
options
data_key.hpp
Go to the documentation of this file.
1
// Copyright 2009-present 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 <string>
18
#include <vector>
19
20
#include <
mongocxx/client_encryption-fwd.hpp
>
21
#include <
mongocxx/options/data_key-fwd.hpp
>
22
23
#include <
bsoncxx/document/view_or_value.hpp
>
24
#include <
bsoncxx/stdx/optional.hpp
>
25
26
#include <
mongocxx/stdx.hpp
>
27
28
#include <
mongocxx/config/prelude.hpp
>
29
30
namespace
mongocxx
{
31
namespace
v_noabi {
32
namespace
options {
33
37
class
data_key
{
38
public
:
76
// keyId: Optional<String>, // keyId is the KMIP Unique Identifier to a 96 byte KMIP Secret
77
// // Data managed object.If keyId is omitted, the driver creates a
78
// // random 96 byte KMIP Secret Data managed object.
79
// endpoint: Optional<String> // Host with optional port.
93
MONGOCXX_ABI_EXPORT_CDECL
(
data_key
&)
94
master_key
(
bsoncxx
::v_noabi::document::view_or_value
master_key
);
95
102
MONGOCXX_ABI_EXPORT_CDECL
(const stdx::optional<
bsoncxx
::v_noabi::document::view_or_value>&)
103
master_key
() const;
104
119
MONGOCXX_ABI_EXPORT_CDECL
(
data_key
&)
key_alt_names
(
std
::vector<
std
::
string
>
key_alt_names
);
120
127
MONGOCXX_ABI_EXPORT_CDECL
(const
std
::vector<
std
::
string
>&)
key_alt_names
() const;
128
132
using
key_material_type
=
std
::vector<uint8_t>;
133
153
MONGOCXX_ABI_EXPORT_CDECL
(
data_key
&)
key_material
(
key_material_type
key_material
);
154
164
MONGOCXX_ABI_EXPORT_CDECL
(const stdx::optional<
key_material_type
>&)
key_material
();
165
166
private:
167
friend ::
mongocxx
::v_noabi::
client_encryption
;
168
169
void
* convert() const;
170
171
stdx::optional<
bsoncxx
::v_noabi::document::view_or_value> _master_key;
172
std
::vector<
std
::
string
> _key_alt_names;
173
stdx::optional<
key_material_type
> _key_material;
174
};
175
176
}
// namespace options
177
}
// namespace v_noabi
178
}
// namespace mongocxx
179
180
// CXX-2770: missing include of postlude header.
181
#if defined(MONGOCXX_TEST_MACRO_GUARDS_FIX_MISSING_POSTLUDE)
182
#include <
mongocxx/config/postlude.hpp
>
183
#endif
184
mongocxx::v_noabi::options::client_encryption
Class representing options for the object managing explicit client-side encryption.
Definition
client_encryption.hpp:37
mongocxx::v_noabi::options::data_key
Class representing options for data key generation for encryption.
Definition
data_key.hpp:37
mongocxx::v_noabi::options::data_key::key_alt_names
const std::vector< std::string > & key_alt_names() const
Gets the alternate names for the data key.
mongocxx::v_noabi::options::data_key::master_key
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & master_key() const
Gets the master key.
mongocxx::v_noabi::options::data_key::key_material_type
std::vector< uint8_t > key_material_type
Represents binary data used to represent key material.
Definition
data_key.hpp:132
mongocxx::v_noabi::options::data_key::key_material
const stdx::optional< key_material_type > & key_material()
Gets the keyMaterial as binary data.
client_encryption-fwd.hpp
Declares mongocxx::v_noabi::client_encryption.
data_key-fwd.hpp
Declares mongocxx::v_noabi::options::data_key.
view_or_value.hpp
Provides bsoncxx::v_noabi::document::view_or_value.
MONGOCXX_ABI_EXPORT_CDECL
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition
fwd.hpp:222
postlude.hpp
The mongocxx macro guard postlude header.
prelude.hpp
The mongocxx macro guard prelude header.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
std
The top-level namespace reserved for the C++ standard library.
optional.hpp
Provides std::optional-related polyfills for library API usage.
stdx.hpp
Redeclares bsoncxx::v_noabi::stdx in mongocxx::v_noabi::stdx for internal use.
Generated by
1.12.0