#include <mongocxx/v_noabi/mongocxx/options/data_key.hpp>
|
| using | key_material_type = std::vector<std::uint8_t> |
| | Represents binary data used to represent key material.
|
◆ key_material_type
Represents binary data used to represent key material.
◆ data_key() [1/2]
| mongocxx::v_noabi::options::data_key::data_key |
( |
| ) |
|
|
default |
◆ data_key() [2/2]
◆ key_alt_names() [1/2]
| std::vector< std::string > const & mongocxx::v_noabi::options::data_key::key_alt_names |
( |
| ) |
const |
|
inline |
Gets the alternate names for the data key.
- Returns
- The alternate names for the data key.
◆ key_alt_names() [2/2]
| data_key & mongocxx::v_noabi::options::data_key::key_alt_names |
( |
std::vector< std::string > | key_alt_names | ) |
|
|
inline |
Sets an optional list of string alternate names used to reference the key. If a key is created with alternate names, then encryption may refer to the key by the unique alternate name instead of by _id.
- Parameters
-
| key_alt_names | The alternate names for the key. |
- Returns
- A reference to this object.
- See also
-
◆ key_material() [1/2]
Gets the keyMaterial as binary data.
- Returns
- The binary data for the key material
- See also
-
◆ key_material() [2/2]
Sets the binary data for the key material.
An optional BinData of 96 bytes to use as custom key material for the data key being created. If keyMaterial is given, the custom key material is used for encrypting and decrypting data.
Otherwise, the key material for the new data key is generated from a cryptographically secure random device.
- Parameters
-
| key_material | The binary data for the keyMaterial |
- Returns
- A reference to this object.
- See also
-
◆ master_key() [1/2]
Gets the master key.
- Returns
- An optional document containing the master key.
◆ master_key() [2/2]
Sets a KMS-specific key used to encrypt the new data key.
If the KMS provider is "aws" the masterKey is required and has the following fields:
{
region: String,
key: String,
endpoint: Optional<String>
}
If the KMS provider is "azure" the masterKey is required and has the following fields:
{
keyVaultEndpoint: String,
keyName: String,
keyVersion: Optional<String>
}
If the KMS provider is "gcp" the masterKey is required and has the following fields:
{
projectId: String,
location: String,
keyRing: String,
keyName: String,
keyVersion: Optional<String>,
endpoint: Optional<String>
}
If the KMS provider is "kmip" the masterKey is required and has the following fields:
{
keyId: Optional<String>,
endpoint: Optional<String>,
delegated: Optional<Boolean>
}
If the KMS provider is "local" the masterKey is not applicable.
- Parameters
-
| master_key | The document representing the master key. |
- Returns
- A reference to this object.
- See also
-
◆ operator v1::data_key_options()
The documentation for this class was generated from the following file: