Loading...
Searching...
No Matches
mongocxx::v1::data_key_options Class Reference

`#include <mongocxx/v1/data_key_options.hpp>`

## Description

A Data Encryption Key (DEK) for In-Use Encryption.

Supported fields include:

- key_alt_names ("keyAltNames")
- key_material ("keyMaterial")
- master_key ("masterKey")

See also
  - Encryption Keys and Key Vaults (MongoDB Manual)

## Public Types

using | key_material_type = std::vector<std::uint8_t>
| Binary data with a length of exactly 96 bytes.

## Public Member Functions

| data_key_options ()
| Default initialization.
| data_key_options (data_key_options &&other) noexcept
| Move constructor.
| data_key_options (data_key_options const &other)
| Copy construction.
| ~data_key_options ()
| Destroy this object.
std::vector< std::string > | key_alt_names () const
| Return the current "keyAltNames" field.
data_key_options & | key_alt_names (std::vector< std::string > v)
| Set the "keyAltNames" field.
bsoncxx::v1::stdx::optional< key_material_type > | key_material () const
| Return the current "keyMaterial" field.
data_key_options & | key_material (key_material_type v)
| Set the "keyMaterial" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > | master_key () const
| Return the current "masterKey" field.
data_key_options & | master_key (bsoncxx::v1::document::value v)
| Set the "masterKey" field.
data_key_options & | operator= (data_key_options &&other) noexcept
| Move assignment.
data_key_options & | operator= (data_key_options const &other)
| Copy assignment.

## Member Typedef Documentation

## key_material_type

using mongocxx::v1::data_key_options::key_material_type = std::vector<std::uint8_t>

Binary data with a length of exactly 96 bytes.

## Constructor & Destructor Documentation

## ~data_key_options()

mongocxx::v1::data_key_options::~data_key_options | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## data_key_options() [1/3]

mongocxx::v1::data_key_options::data_key_options | ( | data_key_options && | other | ) |

noexcept

Move constructor.

Postconditions:
  - other is in an assign-or-destroy-only state.

## data_key_options() [2/3]

mongocxx::v1::data_key_options::data_key_options | ( | data_key_options const & | other | ) |

Copy construction.

## data_key_options() [3/3]

mongocxx::v1::data_key_options::data_key_options | ( |  | ) |

Default initialization.

Postconditions:
  - All supported fields are "unset" or zero-initialized.

## Member Function Documentation

## key_alt_names() [1/2]

std::vector< std::string > mongocxx::v1::data_key_options::key_alt_names | ( |  | ) | const

Return the current "keyAltNames" field.

## key_alt_names() [2/2]

data_key_options & mongocxx::v1::data_key_options::key_alt_names | ( | std::vector< std::string > | v | ) |

Set the "keyAltNames" field.

## key_material() [1/2]

bsoncxx::v1::stdx::optional< key_material_type > mongocxx::v1::data_key_options::key_material | ( |  | ) | const

Return the current "keyMaterial" field.

## key_material() [2/2]

data_key_options & mongocxx::v1::data_key_options::key_material | ( | key_material_type | v | ) |

Set the "keyMaterial" field.

## master_key() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::data_key_options::master_key | ( |  | ) | const

Return the current "masterKey" field.

## master_key() [2/2]

data_key_options & mongocxx::v1::data_key_options::master_key | ( | bsoncxx::v1::document::value | v | ) |

Set the "masterKey" field.

## operator=() [1/2]

data_key_options & mongocxx::v1::data_key_options::operator= | ( | data_key_options && | other | ) |

noexcept

Move assignment.

Postconditions:
  - other is in an assign-or-destroy-only state.

## operator=() [2/2]

data_key_options & mongocxx::v1::data_key_options::operator= | ( | data_key_options const & | other | ) |

Copy assignment.

The documentation for this class was generated from the following file:

- mongocxx/v1/data_key_options.hpp