1MONGOC_CLIENT_ENCRYPTION_CREATE_DATAlKiMEbOYmN(oG3nO)gCo_cCLIENT_ENCRYPTION_CREATE_DATAKEY(3)
2
3
4

NAME

6       mongoc_client_encryption_create_datakey - mongoc_client_encryption_cre‐
7       ate_datakey()
8

SYNOPSIS

10          bool
11          mongoc_client_encryption_create_datakey (
12             mongoc_client_encryption_t *client_encryption,
13             const char *kms_provider,
14             mongoc_client_encryption_datakey_opts_t *opts,
15             bson_value_t *keyid,
16             bson_error_t *error);
17
18       Creates a new key document in the key vault collection and  sets  keyid
19       to  the UUID of the newly created key if keyid is not NULL. The new key
20       can be used to configure automatic  encryption  (see  mongoc_client_en‐
21       able_auto_encryption() and mongoc_client_pool_enable_auto_encryption())
22       or for explicit encryption (see mongoc_client_encryption_encrypt()).
23
24       The created key document is inserted  into  the  key  vault  collection
25       (identified via mongoc_client_encryption_opts_set_keyvault_namespace())
26       with majority write concern.
27
28       keyid  is  always  initialized  (even  on  error).  Caller  must   call
29       bson_value_destroy() on keyid to free.
30

PARAMETERS

32client_encryption: A mongoc_client_encryption_t.
33
34kms_provider:  A  string identifying the Key Management Service (KMS)
35         provider used to encrypt the datakey (e.g. "aws" or "local").
36
37opts: A mongoc_client_encryption_datakey_opts_t
38
39keyid: The resulting UUID key ID of the newly created key.
40
41error: A bson_error_t
42

RETURNS

44       Returns true if successful. Returns false and sets error otherwise.
45
46       SEE ALSO:
47          mongoc_client_encryption_datakey_opts_t
48
49

AUTHOR

51       MongoDB, Inc
52
54       2017-present, MongoDB, Inc
55
56
57
58
591.21.1                           MarM0O2N,GO2C0_2C2LIENT_ENCRYPTION_CREATE_DATAKEY(3)
Impressum