libmongocrypt
|
#include <mc-fle2-insert-update-payload-private-v2.h>
Data Fields | ||
_mongocrypt_buffer_t | edcDerivedToken | |
_mongocrypt_buffer_t | escDerivedToken | |
_mongocrypt_buffer_t | encryptedTokens | |
_mongocrypt_buffer_t | indexKeyId | |
bson_type_t | valueType | |
_mongocrypt_buffer_t | value | |
_mongocrypt_buffer_t | serverEncryptionToken | |
_mongocrypt_buffer_t | serverDerivedFromDataToken | |
int64_t | contentionFactor | |
mc_array_t | edgeTokenSetArray | |
mc_optional_int64_t | sparsity | |
mc_optional_int32_t | precision | |
mc_optional_int32_t | trimFactor | |
bson_value_t | indexMin | |
bson_value_t | indexMax | |
struct { | ||
mc_TextSearchTokenSets_t tsts | ||
bool set | ||
} | textSearchTokenSets | |
_mongocrypt_buffer_t | plaintext | |
_mongocrypt_buffer_t | userKeyId | |
FLE2InsertUpdatePayloadV2 represents an FLE2 payload of an indexed field to insert or update. It is created client side.
FLE2InsertUpdatePayloadV2 has the following data layout:
struct { uint8_t fle_blob_subtype = 11; uint8_t bson[]; } FLE2InsertUpdatePayloadV2;
bson is a BSON document of this form: d: <binary> // EDCDerivedFromDataTokenAndContentionFactor s: <binary> // ESCDerivedFromDataTokenAndContentionFactor p: <binary> // Encrypted Tokens u: <UUID> // Index KeyId t: <int32> // Encrypted type v: <binary> // Encrypted value e: <binary> // ServerDataEncryptionLevel1Token l: <binary> // ServerDerivedFromDataToken k: <int64> // Randomly sampled contention factor value g: array<EdgeTokenSetV2> // Array of Edges. Only included for range payloads. sp: optional<int64> // Sparsity. Only included for range payloads. pn: optional<int32> // Precision. Only included for range payloads. tf: optional<int32> // Trim Factor. Only included for range payloads. mn: optional<any> // Index Min. Only included for range payloads. mx: optional<any> // Index Max. Only included for range payloads.
p is the result of: Encrypt( key=ECOCToken, plaintext=( ESCDerivedFromDataTokenAndContentionFactor) )
v is the result of: UserKeyId || EncryptAEAD( key=UserKey, plaintext=value associated_data=UserKeyId)