libmongocrypt
mc-fle2-find-equality-payload-private-v2.h
1 /*
2  * Copyright 2022-present MongoDB, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MC_FLE2_FIND_EQUALITY_PAYLOAD_PRIVATE_V2_H
18 #define MC_FLE2_FIND_EQUALITY_PAYLOAD_PRIVATE_V2_H
19 
20 #include "mongocrypt-buffer-private.h"
21 #include "mongocrypt-private.h"
22 #include "mongocrypt.h"
23 
24 typedef struct {
25  _mongocrypt_buffer_t edcDerivedToken; // d
26  _mongocrypt_buffer_t escDerivedToken; // s
27  _mongocrypt_buffer_t serverDerivedFromDataToken; // l
28  int64_t maxContentionFactor; // cm
30 
31 void mc_FLE2FindEqualityPayloadV2_init(mc_FLE2FindEqualityPayloadV2_t *payload);
32 
33 bool mc_FLE2FindEqualityPayloadV2_parse(mc_FLE2FindEqualityPayloadV2_t *out,
34  const bson_t *in,
35  mongocrypt_status_t *status);
36 
37 bool mc_FLE2FindEqualityPayloadV2_serialize(const mc_FLE2FindEqualityPayloadV2_t *payload, bson_t *out);
38 
39 void mc_FLE2FindEqualityPayloadV2_cleanup(mc_FLE2FindEqualityPayloadV2_t *payload);
40 
41 #endif /* MC_FLE2_FIND_EQUALITY_PAYLOAD_PRIVATE_V2_H */
struct _mongocrypt_status_t mongocrypt_status_t
Definition: mongocrypt.h:152
Definition: mc-fle2-find-equality-payload-private-v2.h:24