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             const 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
21       mongoc_client_enable_auto_encryption()                              and
22       mongoc_client_pool_enable_auto_encryption()) or for explicit encryption
23       (see mongoc_client_encryption_encrypt()).
24
25       The  created  key  document  is  inserted into the key vault collection
26       (identified via mongoc_client_encryption_opts_set_keyvault_namespace())
27       with majority write concern.
28
29       keyid   is  always  initialized  (even  on  error).  Caller  must  call
30       bson_value_destroy() on keyid to free.
31

PARAMETERS

33client_encryption: A mongoc_client_encryption_t.
34
35kms_provider: A string identifying the Key Management  Service  (KMS)
36         provider used to encrypt the datakey (e.g. "aws" or "local").
37
38opts: A mongoc_client_encryption_datakey_opts_t
39
40keyid:  Optional. An uninitialized bson_value_t set to the UUID (BSON
41         binary subtype 0x04) of the newly  created  key.  Must  be  freed  by
42         bson_value_destroy().
43
44error: Optional. A bson_error_t.
45

RETURNS

47       Returns true if successful. Returns false and sets error otherwise.
48
49       SEE ALSO:
50          mongoc_client_encryption_datakey_opts_t
51
52

AUTHOR

54       MongoDB, Inc
55
57       2017-present, MongoDB, Inc
58
59
60
61
621.24.3                           AugM1O7N,GO2C0_2C3LIENT_ENCRYPTION_CREATE_DATAKEY(3)
Impressum