Skip to content

Commit f2a5bd9

Browse files
set unindexed algorithm
1 parent 58c05d7 commit f2a5bd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/MongoDB.Driver.Tests/Specifications/client-side-encryption/prose-tests/ClientEncryptionProseTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ void RunTestCase(int testCase)
143143
var createCollectionOptions = new CreateCollectionOptions { EncryptedFields = encryptedFields };
144144
var collection = CreateEncryptedCollection(client, clientEncryption, __collCollectionNamespace, createCollectionOptions, kmsProvider, async);
145145
var dataKey = createCollectionOptions.EncryptedFields["fields"].AsBsonArray[0].AsBsonDocument["keyId"].AsGuid; // get generated datakey
146-
var encryptedValue = ExplicitEncrypt(clientEncryption, new EncryptOptions(algorithm: EncryptionAlgorithm.AEAD_AES_256_CBC_HMAC_SHA_512_Deterministic, keyId: dataKey), "123-45-6789", async); // use explicit encryption to encrypt data before inserting
147-
Insert(collection, async, new BsonDocument("ssn", encryptedValue)); // this still fails as in case 1
146+
var encryptedValue = ExplicitEncrypt(clientEncryption, new EncryptOptions(algorithm: EncryptionAlgorithm.Unindexed, keyId: dataKey), "123-45-6789", async); // use explicit encryption to encrypt data before inserting
147+
Insert(collection, async, new BsonDocument("ssn", encryptedValue));
148148
}
149149
break;
150150
default: throw new Exception($"Unexpected test case {testCase}.");

0 commit comments

Comments
 (0)