summaryrefslogtreecommitdiff
path: root/src/mongo/crypto/fle_crypto.h
diff options
context:
space:
mode:
authorjoshua <80741223+jlap199@users.noreply.github.com>2022-04-05 20:39:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-05 22:49:49 +0000
commit9d9bd56eedd0370bd93394223f688e74a6f6de1e (patch)
tree7bd95b16ac4bea195315aa3e59be65f494258c9c /src/mongo/crypto/fle_crypto.h
parent522885233e62718d1d46b290522385be2c42cba2 (diff)
downloadmongo-9d9bd56eedd0370bd93394223f688e74a6f6de1e.tar.gz
SERVER-64749 Test tags reader with non-trivial contention factors
Diffstat (limited to 'src/mongo/crypto/fle_crypto.h')
-rw-r--r--src/mongo/crypto/fle_crypto.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/crypto/fle_crypto.h b/src/mongo/crypto/fle_crypto.h
index 1092a817d82..f72204f941e 100644
--- a/src/mongo/crypto/fle_crypto.h
+++ b/src/mongo/crypto/fle_crypto.h
@@ -721,6 +721,7 @@ private:
}
};
+using ContentionFactorFn = std::function<uint64_t(const FLE2EncryptionPlaceholder&)>;
class FLEClientCrypto {
public:
@@ -772,6 +773,14 @@ public:
*/
static BSONObj transformPlaceholders(const BSONObj& obj, FLEKeyVault* keyVault);
+ /**
+ * Generates a client-side payload that is sent to the server. Contention factor is given
+ * explicitly as a lambda expression.
+ */
+ static BSONObj transformPlaceholders(const BSONObj& obj,
+ FLEKeyVault* keyVault,
+ const ContentionFactorFn& contentionFactor);
+
/**
* For every encrypted field path in the EncryptedFieldConfig, this generates