File tree Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -61,19 +61,40 @@ ClientEncryption.encrypt()
61
61
62
62
- The value to encrypt.
63
63
64
- * - ``encryptionAlgorithm``
64
+ * - ``encryptionAlgorithm`` or ``encryptionOptions``
65
65
66
- - string
66
+ - string or document
67
67
68
- - The encryption algorithm to use for encrypting the ``value``.
68
+ - When specifying ``encryptionAlgorithm``:
69
+
70
+ The encryption algorithm to use for encrypting the ``value``.
69
71
70
72
- ``AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic``
71
73
72
74
- ``AEAD_AES_256_CBC_HMAC_SHA_512-Random``
75
+
76
+ - ``Indexed``
77
+
78
+ - ``Unindexed``
73
79
74
80
For complete documentation on the supported encryption
75
81
algorithms, see :ref:`field-level-encryption-algorithms`.
76
82
83
+ - When specifying ``encryptionOptions``:
84
+
85
+ - ``algorithm``: The encryption algorithm to use for
86
+ encrypting the ``value``.
87
+
88
+ - ``keyId``: ID of the data decryption key.
89
+
90
+ - ``contentionFactor``: Required when ``algorithm`` is set
91
+ to ``Indexed``. Related to the frequency of the values for
92
+ this field.
93
+
94
+ - ``queryType``: The only query type currently supported is
95
+ ``"equality"``. ``queryType`` must be set when algorithm is
96
+ not ``Indexed``.
97
+
77
98
:returns:
78
99
79
100
A :bsontype:`binary data <Binary>` object with
Original file line number Diff line number Diff line change @@ -148,6 +148,18 @@ KeyVault.createKey()
148
148
<index-type-partial>` filter for only documents where
149
149
``keyAltNames`` exists.
150
150
151
+ * - ``options``
152
+ - document
153
+ - *Optional*
154
+
155
+ A document that specifies options for the new key.
156
+ ``options`` has the following fields:
157
+
158
+ - ``masterKey``: the new master key to encrypt data.
159
+ - ``keyAltNames``: an array of alternate names, one per
160
+ master key.
161
+ - ``keyMaterial``: bindata used to create the key.
162
+
151
163
:returns:
152
164
153
165
The ``UUID`` unique identifier of the created data encryption
You can’t perform that action at this time.
0 commit comments