Skip to content

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

source/includes/qe-tutorials/php/queryable-encryption-helpers.php

-8
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,6 @@ function createEncryptedCollection(
190190
): void
191191
{
192192
try {
193-
// This should be done in the createEncryptedCollection method
194-
foreach ($encryptedFieldsMap['encryptedFields']['fields'] as &$field) {
195-
if (!isset($field['keyId'])) {
196-
$keyId = $clientEncryption->createDataKey($kmsProviderName, $customerMasterKeyCredentials);
197-
$field['keyId'] = $keyId;
198-
}
199-
}
200-
201193
// start-create-encrypted-collection
202194
$client->getDatabase($encryptedDatabase)->createEncryptedCollection(
203195
$encryptedCollectionName,

source/includes/qe-tutorials/php/queryable-encryption-tutorial.php

+2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@
5252
'path' => 'patientRecord.ssn',
5353
'bsonType' => 'string',
5454
'queries' => ['queryType' => 'equality'],
55+
'keyId' => null,
5556
],
5657
[
5758
'path' => 'patientRecord.billing',
5859
'bsonType' => 'object',
60+
'keyId' => null,
5961
],
6062
],
6163
],

0 commit comments

Comments
 (0)