17 #ifndef MC_FLE2_INSERT_UPDATE_PAYLOAD_PRIVATE_V2_H
18 #define MC_FLE2_INSERT_UPDATE_PAYLOAD_PRIVATE_V2_H
20 #include <bson/bson.h>
22 #include "mc-array-private.h"
23 #include "mc-optional-private.h"
24 #include "mongocrypt-buffer-private.h"
25 #include "mongocrypt-private.h"
28 #define DEF_TEXT_SEARCH_TOKEN_SET(Type) \
30 _mongocrypt_buffer_t edcDerivedToken; \
31 _mongocrypt_buffer_t escDerivedToken; \
32 _mongocrypt_buffer_t serverDerivedFromDataToken; \
33 _mongocrypt_buffer_t encryptedTokens; \
34 } mc_Text##Type##TokenSet_t; \
35 void mc_Text##Type##TokenSet_init(mc_Text##Type##TokenSet_t *); \
36 void mc_Text##Type##TokenSet_cleanup(mc_Text##Type##TokenSet_t *); \
37 void mc_Text##Type##TokenSet_shallow_copy(const mc_Text##Type##TokenSet_t *src, mc_Text##Type##TokenSet_t *dest)
39 DEF_TEXT_SEARCH_TOKEN_SET(Exact);
40 DEF_TEXT_SEARCH_TOKEN_SET(Substring);
41 DEF_TEXT_SEARCH_TOKEN_SET(Suffix);
42 DEF_TEXT_SEARCH_TOKEN_SET(Prefix);
45 mc_TextExactTokenSet_t exact;
46 mc_array_t substringArray;
47 mc_array_t suffixArray;
48 mc_array_t prefixArray;
97 _mongocrypt_buffer_t edcDerivedToken;
98 _mongocrypt_buffer_t escDerivedToken;
99 _mongocrypt_buffer_t encryptedTokens;
100 _mongocrypt_buffer_t indexKeyId;
101 bson_type_t valueType;
102 _mongocrypt_buffer_t value;
103 _mongocrypt_buffer_t serverEncryptionToken;
104 _mongocrypt_buffer_t serverDerivedFromDataToken;
105 int64_t contentionFactor;
106 mc_array_t edgeTokenSetArray;
107 mc_optional_int64_t sparsity;
108 mc_optional_int32_t precision;
109 mc_optional_int32_t trimFactor;
110 bson_value_t indexMin;
111 bson_value_t indexMax;
116 } textSearchTokenSets;
118 _mongocrypt_buffer_t plaintext;
119 _mongocrypt_buffer_t userKeyId;
124 BSON_STATIC_ASSERT2(alignof_mc_FLE2InsertUpdatePayloadV2_t,
139 _mongocrypt_buffer_t edcDerivedToken;
140 _mongocrypt_buffer_t escDerivedToken;
141 _mongocrypt_buffer_t serverDerivedFromDataToken;
142 _mongocrypt_buffer_t encryptedTokens;
148 const _mongocrypt_buffer_t *in,
154 const _mongocrypt_buffer_t *mc_FLE2InsertUpdatePayloadV2_decrypt(_mongocrypt_crypto_t *crypto,
156 const _mongocrypt_buffer_t *user_key,
struct _mongocrypt_status_t mongocrypt_status_t
Definition: mongocrypt.h:152
Definition: mc-fle2-insert-update-payload-private-v2.h:138
Definition: mc-fle2-insert-update-payload-private-v2.h:96
Definition: mc-fle2-insert-update-payload-private-v2.h:44