libmongocrypt-helper 1.7.4.0.1002 → 1.8.0.0.1001

Sign up to get free protection for your applications and to get access to all the features.
Files changed (396) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/ext/libmongocrypt/libmongocrypt/CHANGELOG.md +9 -7
  4. data/ext/libmongocrypt/libmongocrypt/CMakeLists.txt +17 -23
  5. data/ext/libmongocrypt/libmongocrypt/Earthfile +374 -0
  6. data/ext/libmongocrypt/libmongocrypt/README.md +7 -7
  7. data/ext/libmongocrypt/libmongocrypt/VERSION_CURRENT +1 -1
  8. data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/CryptClient.cs +25 -6
  9. data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt/Library.cs +25 -3
  10. data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Example/MongoDB.Libmongocrypt.Example.csproj +1 -1
  11. data/ext/libmongocrypt/libmongocrypt/bindings/cs/MongoDB.Libmongocrypt.Test/BasicTests.cs +1 -1
  12. data/ext/libmongocrypt/libmongocrypt/bindings/cs/Scripts/build.cake +3 -2
  13. data/ext/libmongocrypt/libmongocrypt/bindings/cs/cs.sln +79 -0
  14. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/build.gradle.kts +2 -2
  15. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/java/com/mongodb/crypt/capi/MongoCryptTest.java +6 -4
  16. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit-v2/int32/encrypted-payload.json +26 -0
  17. data/ext/libmongocrypt/libmongocrypt/bindings/node/CHANGELOG.md +24 -0
  18. data/ext/libmongocrypt/libmongocrypt/bindings/node/README.md +134 -5
  19. data/ext/libmongocrypt/libmongocrypt/bindings/node/etc/build-static.sh +3 -6
  20. data/ext/libmongocrypt/libmongocrypt/bindings/node/index.d.ts +203 -77
  21. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/autoEncrypter.js +1 -1
  22. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/clientEncryption.js +165 -43
  23. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/common.js +12 -14
  24. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/errors.js +75 -0
  25. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/index.js +34 -3
  26. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/aws.js +26 -0
  27. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/azure.js +178 -0
  28. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/gcp.js +24 -0
  29. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/index.js +54 -0
  30. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/providers/utils.js +39 -0
  31. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/stateMachine.js +9 -4
  32. data/ext/libmongocrypt/libmongocrypt/bindings/node/package-lock.json +4440 -5189
  33. data/ext/libmongocrypt/libmongocrypt/bindings/node/package.json +27 -8
  34. data/ext/libmongocrypt/libmongocrypt/bindings/node/src/mongocrypt.cc +65 -38
  35. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/autoEncrypter.test.js +4 -7
  36. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/clientEncryption.test.js +434 -42
  37. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/common.test.js +94 -0
  38. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/cryptoCallbacks.test.js +1 -45
  39. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/index.test.js +45 -0
  40. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/mongocryptdManager.test.js +1 -1
  41. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/providers/credentialsProvider.test.js +551 -0
  42. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/release.test.js +10 -3
  43. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/requirements.helper.js +23 -1
  44. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/stateMachine.test.js +1 -1
  45. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/tools/chai-addons.js +8 -0
  46. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/types/index.test-d.ts +63 -0
  47. data/ext/libmongocrypt/libmongocrypt/bindings/python/CHANGELOG.rst +26 -0
  48. data/ext/libmongocrypt/libmongocrypt/bindings/python/README.rst +2 -2
  49. data/ext/libmongocrypt/libmongocrypt/bindings/python/build-manylinux-wheel.sh +1 -1
  50. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/binding.py +128 -238
  51. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/compat.py +0 -27
  52. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/explicit_encrypter.py +1 -1
  53. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/mongocrypt.py +5 -21
  54. data/ext/libmongocrypt/libmongocrypt/bindings/python/pymongocrypt/version.py +2 -2
  55. data/ext/libmongocrypt/libmongocrypt/bindings/python/release.sh +5 -5
  56. data/ext/libmongocrypt/libmongocrypt/bindings/python/setup.py +14 -9
  57. data/ext/libmongocrypt/libmongocrypt/bindings/python/test/__init__.py +1 -10
  58. data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit-v2/int32/encrypted-payload.json +26 -0
  59. data/ext/libmongocrypt/libmongocrypt/bindings/python/test/test_mongocrypt.py +5 -5
  60. data/ext/libmongocrypt/libmongocrypt/bindings/python/test-requirements.txt +4 -12
  61. data/ext/libmongocrypt/libmongocrypt/cmake/ImportBSON.cmake +8 -6
  62. data/ext/libmongocrypt/libmongocrypt/cmake/IntelDFP.cmake +2 -1
  63. data/ext/libmongocrypt/libmongocrypt/cmake/Platform.cmake +50 -0
  64. data/ext/libmongocrypt/libmongocrypt/cmake/mongocrypt-config.cmake +21 -0
  65. data/ext/libmongocrypt/libmongocrypt/debian/gbp.conf +2 -2
  66. data/ext/libmongocrypt/libmongocrypt/etc/c6-vault.repo +39 -0
  67. data/ext/libmongocrypt/libmongocrypt/etc/fle2_aead_generate_tests.py +15 -24
  68. data/ext/libmongocrypt/libmongocrypt/etc/fle2_crypto.py +66 -54
  69. data/ext/libmongocrypt/libmongocrypt/etc/fle2_generate_tests.py +14 -23
  70. data/ext/libmongocrypt/libmongocrypt/etc/fle2v2_aead_generate_tests.py +32 -0
  71. data/ext/libmongocrypt/libmongocrypt/etc/format-all.sh +12 -0
  72. data/ext/libmongocrypt/libmongocrypt/etc/format.sh +16 -0
  73. data/ext/libmongocrypt/libmongocrypt/etc/install-package.sh +48 -0
  74. data/ext/libmongocrypt/libmongocrypt/etc/mongo-inteldfp-libmongocrypt-pr-625.patch +13 -0
  75. data/ext/libmongocrypt/libmongocrypt/src/crypto/cng.c +381 -436
  76. data/ext/libmongocrypt/libmongocrypt/src/crypto/commoncrypto.c +162 -227
  77. data/ext/libmongocrypt/libmongocrypt/src/crypto/libcrypto.c +180 -248
  78. data/ext/libmongocrypt/libmongocrypt/src/crypto/none.c +33 -55
  79. data/ext/libmongocrypt/libmongocrypt/src/csfle-markup.cpp +175 -205
  80. data/ext/libmongocrypt/libmongocrypt/src/mc-array-private.h +10 -21
  81. data/ext/libmongocrypt/libmongocrypt/src/mc-array.c +44 -56
  82. data/ext/libmongocrypt/libmongocrypt/src/mc-check-conversions-private.h +4 -8
  83. data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.h +351 -463
  84. data/ext/libmongocrypt/libmongocrypt/src/mc-dec128.test.cpp +59 -66
  85. data/ext/libmongocrypt/libmongocrypt/src/mc-efc-private.h +7 -11
  86. data/ext/libmongocrypt/libmongocrypt/src/mc-efc.c +80 -92
  87. data/ext/libmongocrypt/libmongocrypt/src/mc-fle-blob-subtype-private.h +18 -10
  88. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder-private.h +59 -70
  89. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-encryption-placeholder.c +384 -439
  90. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-private-v2.h +41 -0
  91. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-private.h +11 -18
  92. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload-v2.c +135 -0
  93. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-equality-payload.c +109 -126
  94. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private-v2.h +88 -0
  95. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-private.h +24 -27
  96. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload-v2.c +137 -0
  97. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-find-range-payload.c +106 -125
  98. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private-v2.h +117 -0
  99. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-private.h +28 -36
  100. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload-v2.c +294 -0
  101. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-insert-update-payload.c +237 -278
  102. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-private-v2.h +133 -0
  103. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-private.h +67 -56
  104. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev-v2.c +437 -0
  105. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-iev.c +476 -325
  106. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-common-private.h +69 -0
  107. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-common.c +182 -0
  108. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-private.h +23 -31
  109. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-v2-private.h +85 -0
  110. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev-v2.c +142 -0
  111. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-payload-uev.c +104 -231
  112. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-range-operator-private.h +8 -7
  113. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds-private.h +55 -56
  114. data/ext/libmongocrypt/libmongocrypt/src/mc-fle2-rfds.c +517 -580
  115. data/ext/libmongocrypt/libmongocrypt/src/mc-optional-private.h +36 -66
  116. data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation-private.h +57 -76
  117. data/ext/libmongocrypt/libmongocrypt/src/mc-range-edge-generation.c +158 -189
  118. data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding-private.h +36 -42
  119. data/ext/libmongocrypt/libmongocrypt/src/mc-range-encoding.c +515 -558
  120. data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-generator.template.h +155 -191
  121. data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover-private.h +43 -53
  122. data/ext/libmongocrypt/libmongocrypt/src/mc-range-mincover.c +170 -240
  123. data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts-private.h +29 -34
  124. data/ext/libmongocrypt/libmongocrypt/src/mc-rangeopts.c +289 -338
  125. data/ext/libmongocrypt/libmongocrypt/src/mc-reader-private.h +36 -71
  126. data/ext/libmongocrypt/libmongocrypt/src/mc-reader.c +111 -164
  127. data/ext/libmongocrypt/libmongocrypt/src/mc-tokens-private.h +55 -49
  128. data/ext/libmongocrypt/libmongocrypt/src/mc-tokens.c +109 -125
  129. data/ext/libmongocrypt/libmongocrypt/src/mc-writer-private.h +66 -0
  130. data/ext/libmongocrypt/libmongocrypt/src/mc-writer.c +141 -0
  131. data/ext/libmongocrypt/libmongocrypt/src/mlib/check.hpp +37 -55
  132. data/ext/libmongocrypt/libmongocrypt/src/mlib/endian.h +11 -11
  133. data/ext/libmongocrypt/libmongocrypt/src/mlib/error.h +27 -32
  134. data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.h +444 -499
  135. data/ext/libmongocrypt/libmongocrypt/src/mlib/int128.test.cpp +251 -334
  136. data/ext/libmongocrypt/libmongocrypt/src/mlib/macros.h +4 -5
  137. data/ext/libmongocrypt/libmongocrypt/src/mlib/path.h +196 -231
  138. data/ext/libmongocrypt/libmongocrypt/src/mlib/path.test.c +56 -79
  139. data/ext/libmongocrypt/libmongocrypt/src/mlib/str.h +411 -530
  140. data/ext/libmongocrypt/libmongocrypt/src/mlib/str.test.c +116 -131
  141. data/ext/libmongocrypt/libmongocrypt/src/mlib/thread.h +17 -26
  142. data/ext/libmongocrypt/libmongocrypt/src/mlib/user-check.h +2 -2
  143. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary-private.h +3 -6
  144. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-binary.c +31 -48
  145. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer-private.h +55 -131
  146. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-buffer.c +444 -565
  147. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo-private.h +1 -2
  148. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-collinfo.c +28 -45
  149. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key-private.h +11 -17
  150. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-key.c +103 -132
  151. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth-private.h +8 -14
  152. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-oauth.c +78 -90
  153. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache-private.h +26 -45
  154. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache.c +220 -273
  155. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext-private.h +13 -25
  156. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ciphertext.c +147 -166
  157. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-compat.h +2 -2
  158. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto-private.h +110 -204
  159. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-crypto.c +1137 -1565
  160. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-datakey.c +425 -472
  161. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-decrypt.c +817 -694
  162. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-encrypt.c +2394 -2697
  163. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-private.h +166 -186
  164. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx-rewrap-many-datakey.c +308 -351
  165. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-ctx.c +921 -1138
  166. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-dll-private.h +16 -24
  167. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endian-private.h +44 -58
  168. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint-private.h +21 -25
  169. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-endpoint.c +167 -181
  170. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek-private.h +37 -43
  171. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kek.c +215 -253
  172. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker-private.h +73 -108
  173. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-broker.c +889 -1034
  174. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key-private.h +27 -44
  175. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-key.c +349 -402
  176. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx-private.h +92 -120
  177. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-kms-ctx.c +1397 -1612
  178. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log-private.h +35 -67
  179. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-log.c +49 -83
  180. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking-private.h +30 -36
  181. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-marking.c +1821 -1470
  182. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-mutex-private.h +7 -12
  183. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts-private.h +80 -108
  184. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-opts.c +354 -424
  185. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-private.h +101 -117
  186. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status-private.h +3 -8
  187. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-status.c +92 -119
  188. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util-private.h +19 -29
  189. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-traverse-util.c +136 -176
  190. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util-private.h +11 -21
  191. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt-util.c +96 -135
  192. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.c +1092 -1320
  193. data/ext/libmongocrypt/libmongocrypt/src/mongocrypt.h +130 -295
  194. data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_dll.c +66 -78
  195. data/ext/libmongocrypt/libmongocrypt/src/os_posix/os_mutex.c +20 -28
  196. data/ext/libmongocrypt/libmongocrypt/src/os_win/os_dll.c +60 -73
  197. data/ext/libmongocrypt/libmongocrypt/src/os_win/os_mutex.c +8 -16
  198. data/ext/libmongocrypt/libmongocrypt/test/crypt_shared-stub.cpp +57 -87
  199. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/empty/encrypted-payload-v2.json +60 -0
  200. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-delete/success/encrypted-payload-v2.json +67 -0
  201. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explain/with-csfle/encrypted-payload.json +2 -2
  202. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed-contentionFactor1-v2.json +8 -0
  203. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/find-indexed-v2.json +8 -0
  204. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-contentionFactor1-v2.json +8 -0
  205. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-same-user-and-index-key-v2.json +8 -0
  206. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-explicit/insert-indexed-v2.json +8 -0
  207. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/cmd.json +6 -0
  208. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/encrypted-field-map.json +22 -0
  209. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/encrypted-payload.json +40 -0
  210. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-equality-v2/mongocryptd-reply.json +19 -0
  211. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/cmd.json +10 -0
  212. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/encrypted-field-map.json +27 -0
  213. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/encrypted-payload.json +41 -0
  214. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/date-v2/mongocryptd-reply.json +49 -0
  215. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/cmd.json +6 -0
  216. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/encrypted-field-map.json +30 -0
  217. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/encrypted-payload.json +50 -0
  218. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-precision-v2/mongocryptd-reply.json +58 -0
  219. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/cmd.json +6 -0
  220. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/encrypted-field-map.json +27 -0
  221. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/encrypted-payload.json +41 -0
  222. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/decimal128-v2/mongocryptd-reply.json +49 -0
  223. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/cmd.json +8 -0
  224. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/encrypted-field-map.json +30 -0
  225. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/encrypted-payload.json +44 -0
  226. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-precision-v2/mongocryptd-reply.json +52 -0
  227. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/cmd.json +8 -0
  228. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/encrypted-field-map.json +27 -0
  229. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/encrypted-payload.json +41 -0
  230. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/double-v2/mongocryptd-reply.json +49 -0
  231. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/cmd.json +8 -0
  232. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/encrypted-field-map.json +27 -0
  233. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/encrypted-payload.json +41 -0
  234. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int32-v2/mongocryptd-reply.json +49 -0
  235. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/cmd.json +8 -0
  236. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/encrypted-field-map.json +27 -0
  237. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/encrypted-payload.json +41 -0
  238. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range/int64-v2/mongocryptd-reply.json +49 -0
  239. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double/encrypted-payload-v2.json +26 -0
  240. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/double-precision/encrypted-payload-v2.json +26 -0
  241. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32/encrypted-payload-v2.json +26 -0
  242. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/encrypted-payload-v2.json +26 -0
  243. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-openinterval/encrypted-payload-v2.json +16 -0
  244. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert/cmd.json +1 -1
  245. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date/RNG_DATA.h +65 -65
  246. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/cmd.json +13 -0
  247. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/encrypted-field-map.json +27 -0
  248. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/encrypted-payload.json +44 -0
  249. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/date-v2/mongocryptd-reply.json +52 -0
  250. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128/RNG_DATA.h +132 -132
  251. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision/RNG_DATA.h +71 -71
  252. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/cmd.json +9 -0
  253. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/encrypted-field-map.json +30 -0
  254. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/encrypted-payload.json +53 -0
  255. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-precision-v2/mongocryptd-reply.json +61 -0
  256. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/cmd.json +9 -0
  257. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/encrypted-field-map.json +27 -0
  258. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/encrypted-payload.json +44 -0
  259. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/decimal128-v2/mongocryptd-reply.json +52 -0
  260. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double/RNG_DATA.h +68 -68
  261. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision/RNG_DATA.h +19 -19
  262. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/cmd.json +11 -0
  263. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/encrypted-field-map.json +30 -0
  264. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/encrypted-payload.json +47 -0
  265. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-precision-v2/mongocryptd-reply.json +55 -0
  266. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/cmd.json +11 -0
  267. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/encrypted-field-map.json +27 -0
  268. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/encrypted-payload.json +44 -0
  269. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/double-v2/mongocryptd-reply.json +52 -0
  270. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32/RNG_DATA.h +25 -25
  271. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/cmd.json +11 -0
  272. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/encrypted-field-map.json +27 -0
  273. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/encrypted-payload.json +44 -0
  274. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int32-v2/mongocryptd-reply.json +52 -0
  275. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64/RNG_DATA.h +65 -65
  276. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/cmd.json +11 -0
  277. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/encrypted-field-map.json +27 -0
  278. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/encrypted-payload.json +44 -0
  279. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range/int64-v2/mongocryptd-reply.json +52 -0
  280. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/RNG_DATA.h +68 -68
  281. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double/encrypted-payload-v2.json +8 -0
  282. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/RNG_DATA.h +19 -19
  283. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/double-precision/encrypted-payload-v2.json +8 -0
  284. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/RNG_DATA.h +25 -25
  285. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32/encrypted-payload-v2.json +8 -0
  286. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/encrypted-payload-v2.json +8 -0
  287. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/RNG_DATA.h +15 -15
  288. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/sparsity-2/encrypted-payload-v2.json +8 -0
  289. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/cmd.json +9 -0
  290. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/encrypted-field-map.json +18 -0
  291. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/encrypted-payload.json +14 -0
  292. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-unindexed-v2/mongocryptd-reply.json +41 -0
  293. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/cmd.json +9 -0
  294. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/encrypted-field-map.json +22 -0
  295. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/encrypted-payload.json +39 -0
  296. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-v2/mongocryptd-reply.json +49 -0
  297. data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneRangeV2.json +10 -0
  298. data/ext/libmongocrypt/libmongocrypt/test/data/iev-v2/FLECrudTest-insertOneV2.json +10 -0
  299. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/README.md +17 -0
  300. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/aes-ctr.json +29 -0
  301. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2-fixed.json +10 -0
  302. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2-generated.json +38 -0
  303. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2aead-decrypt.json +35 -0
  304. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2aead-fixed.json +29 -0
  305. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2aead-generated.json +122 -0
  306. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2v2-aead-fixed.json +29 -0
  307. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/fle2v2-aead-generated.json +122 -0
  308. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/mcgrew.json +12 -0
  309. data/ext/libmongocrypt/libmongocrypt/test/data/roundtrip/nist.json +20 -0
  310. data/ext/libmongocrypt/libmongocrypt/test/data/tokens/README.md +27 -0
  311. data/ext/libmongocrypt/libmongocrypt/test/data/tokens/mc.json +21 -0
  312. data/ext/libmongocrypt/libmongocrypt/test/data/tokens/server.json +21 -0
  313. data/ext/libmongocrypt/libmongocrypt/test/example-no-bson.c +4 -4
  314. data/ext/libmongocrypt/libmongocrypt/test/example-state-machine.c +278 -323
  315. data/ext/libmongocrypt/libmongocrypt/test/fuzz_kms.c +8 -7
  316. data/ext/libmongocrypt/libmongocrypt/test/test-dll.cpp +6 -7
  317. data/ext/libmongocrypt/libmongocrypt/test/test-gcp-auth.c +221 -283
  318. data/ext/libmongocrypt/libmongocrypt/test/test-mc-efc.c +58 -73
  319. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-equality-payload-v2.c +78 -0
  320. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-find-range-payload-v2.c +89 -0
  321. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev-v2.c +248 -0
  322. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iev.c +467 -414
  323. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup-v2.c +172 -0
  324. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-iup.c +141 -159
  325. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-uev-v2.c +338 -0
  326. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-payload-uev.c +238 -176
  327. data/ext/libmongocrypt/libmongocrypt/test/test-mc-fle2-rfds.c +373 -474
  328. data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-edge-generation.c +346 -388
  329. data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-encoding.c +708 -825
  330. data/ext/libmongocrypt/libmongocrypt/test/test-mc-range-mincover.c +417 -481
  331. data/ext/libmongocrypt/libmongocrypt/test/test-mc-rangeopts.c +110 -144
  332. data/ext/libmongocrypt/libmongocrypt/test/test-mc-reader.c +124 -207
  333. data/ext/libmongocrypt/libmongocrypt/test/test-mc-tokens.c +223 -213
  334. data/ext/libmongocrypt/libmongocrypt/test/test-mc-writer.c +176 -0
  335. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.c +634 -807
  336. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert-match-bson.h +1 -2
  337. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-assert.h +168 -189
  338. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-buffer.c +187 -211
  339. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache-oauth.c +34 -36
  340. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-cache.c +210 -233
  341. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ciphertext.c +185 -220
  342. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-compact.c +331 -445
  343. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-hooks.c +670 -814
  344. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.c +102 -135
  345. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto-std-hooks.h +54 -71
  346. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-crypto.c +394 -846
  347. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-csfle-lib.c +159 -183
  348. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-decrypt.c +867 -1045
  349. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-encrypt.c +4349 -4713
  350. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-rewrap-many-datakey.c +750 -964
  351. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-ctx-setopt.c +991 -1178
  352. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-datakey.c +342 -419
  353. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-dll.c +23 -30
  354. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-endpoint.c +98 -111
  355. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kek.c +49 -52
  356. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-broker.c +770 -920
  357. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key-cache.c +354 -407
  358. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-key.c +197 -245
  359. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-ctx.c +286 -370
  360. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-kms-responses.c +147 -166
  361. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-local-kms.c +50 -61
  362. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-log.c +85 -100
  363. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-marking.c +656 -692
  364. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-status.c +46 -58
  365. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-traverse-util.c +377 -451
  366. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.c +48 -67
  367. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt-util.h +4 -10
  368. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.c +827 -918
  369. data/ext/libmongocrypt/libmongocrypt/test/test-mongocrypt.h +111 -172
  370. data/ext/libmongocrypt/libmongocrypt/test/util/csfle.c +508 -559
  371. data/ext/libmongocrypt/libmongocrypt/test/util/util.c +735 -881
  372. data/ext/libmongocrypt/libmongocrypt/test/util/util.h +33 -55
  373. data/lib/libmongocrypt_helper/version.rb +2 -2
  374. data.tar.gz.sig +0 -0
  375. metadata +154 -26
  376. metadata.gz.sig +0 -0
  377. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/encrypted-payload.json +0 -26
  378. data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/fle2-find-range-explicit/int32/key-document.json +0 -0
  379. data/ext/libmongocrypt/libmongocrypt/bindings/node/lib/credentialsProvider.js +0 -33
  380. data/ext/libmongocrypt/libmongocrypt/bindings/node/test/credentialsProvider.test.js +0 -163
  381. data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/fle2-find-range-explicit/int32/encrypted-payload.json +0 -26
  382. data/ext/libmongocrypt/libmongocrypt/test/data/aes-ctr.cstructs +0 -359
  383. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-aead.cstructs +0 -109
  384. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/encrypted-payload.json +0 -26
  385. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/rangeopts.json +0 -5
  386. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-find-range-explicit/int32-nominmax/value-to-encrypt.json +0 -20
  387. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/RNG_DATA.h +0 -70
  388. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/encrypted-payload.json +0 -8
  389. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/rangeopts.json +0 -5
  390. data/ext/libmongocrypt/libmongocrypt/test/data/fle2-insert-range-explicit/int32-nominmax/value-to-encrypt.json +0 -5
  391. data/ext/libmongocrypt/libmongocrypt/test/data/fle2.cstructs +0 -33
  392. /data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/key-filter.json +0 -0
  393. /data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/rangeopts.json +0 -0
  394. /data/ext/libmongocrypt/libmongocrypt/bindings/java/mongocrypt/src/test/resources/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/value-to-encrypt.json +0 -0
  395. /data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/rangeopts.json +0 -0
  396. /data/ext/libmongocrypt/libmongocrypt/bindings/python/test/data/{fle2-find-range-explicit → fle2-find-range-explicit-v2}/int32/value-to-encrypt.json +0 -0
@@ -23,8 +23,8 @@
23
23
  * See all public API documentation in: @ref mongocrypt.h
24
24
  */
25
25
 
26
- #include "mongocrypt-export.h"
27
26
  #include "mongocrypt-compat.h"
27
+ #include "mongocrypt-export.h"
28
28
 
29
29
  /* clang-format off */
30
30
  #ifndef __has_include
@@ -46,9 +46,7 @@
46
46
  * @returns a NULL terminated version string for libmongocrypt.
47
47
  */
48
48
  MONGOCRYPT_EXPORT
49
- const char *
50
- mongocrypt_version (uint32_t *len);
51
-
49
+ const char *mongocrypt_version(uint32_t *len);
52
50
 
53
51
  /**
54
52
  * A non-owning view of a byte buffer.
@@ -74,7 +72,6 @@ mongocrypt_version (uint32_t *len);
74
72
  */
75
73
  typedef struct _mongocrypt_binary_t mongocrypt_binary_t;
76
74
 
77
-
78
75
  /**
79
76
  * Create a new non-owning view of a buffer (data + length).
80
77
  *
@@ -83,9 +80,7 @@ typedef struct _mongocrypt_binary_t mongocrypt_binary_t;
83
80
  * @returns A new mongocrypt_binary_t.
84
81
  */
85
82
  MONGOCRYPT_EXPORT
86
- mongocrypt_binary_t *
87
- mongocrypt_binary_new (void);
88
-
83
+ mongocrypt_binary_t *mongocrypt_binary_new(void);
89
84
 
90
85
  /**
91
86
  * Create a new non-owning view of a buffer (data + length).
@@ -97,9 +92,7 @@ mongocrypt_binary_new (void);
97
92
  * @returns A new @ref mongocrypt_binary_t.
98
93
  */
99
94
  MONGOCRYPT_EXPORT
100
- mongocrypt_binary_t *
101
- mongocrypt_binary_new_from_data (uint8_t *data, uint32_t len);
102
-
95
+ mongocrypt_binary_t *mongocrypt_binary_new_from_data(uint8_t *data, uint32_t len);
103
96
 
104
97
  /**
105
98
  * Get a pointer to the viewed data.
@@ -109,9 +102,7 @@ mongocrypt_binary_new_from_data (uint8_t *data, uint32_t len);
109
102
  * @returns A pointer to the viewed data.
110
103
  */
111
104
  MONGOCRYPT_EXPORT
112
- uint8_t *
113
- mongocrypt_binary_data (const mongocrypt_binary_t *binary);
114
-
105
+ uint8_t *mongocrypt_binary_data(const mongocrypt_binary_t *binary);
115
106
 
116
107
  /**
117
108
  * Get the length of the viewed data.
@@ -121,9 +112,7 @@ mongocrypt_binary_data (const mongocrypt_binary_t *binary);
121
112
  * @returns The length of the viewed data.
122
113
  */
123
114
  MONGOCRYPT_EXPORT
124
- uint32_t
125
- mongocrypt_binary_len (const mongocrypt_binary_t *binary);
126
-
115
+ uint32_t mongocrypt_binary_len(const mongocrypt_binary_t *binary);
127
116
 
128
117
  /**
129
118
  * Free the @ref mongocrypt_binary_t.
@@ -133,9 +122,7 @@ mongocrypt_binary_len (const mongocrypt_binary_t *binary);
133
122
  * @param[in] binary The mongocrypt_binary_t destroy.
134
123
  */
135
124
  MONGOCRYPT_EXPORT
136
- void
137
- mongocrypt_binary_destroy (mongocrypt_binary_t *binary);
138
-
125
+ void mongocrypt_binary_destroy(mongocrypt_binary_t *binary);
139
126
 
140
127
  /**
141
128
  * Indicates success or contains error information.
@@ -151,13 +138,12 @@ typedef struct _mongocrypt_status_t mongocrypt_status_t;
151
138
  * Indicates the type of error.
152
139
  */
153
140
  typedef enum {
154
- MONGOCRYPT_STATUS_OK = 0,
155
- MONGOCRYPT_STATUS_ERROR_CLIENT = 1,
156
- MONGOCRYPT_STATUS_ERROR_KMS = 2,
157
- MONGOCRYPT_STATUS_ERROR_CRYPT_SHARED = 3,
141
+ MONGOCRYPT_STATUS_OK = 0,
142
+ MONGOCRYPT_STATUS_ERROR_CLIENT = 1,
143
+ MONGOCRYPT_STATUS_ERROR_KMS = 2,
144
+ MONGOCRYPT_STATUS_ERROR_CRYPT_SHARED = 3,
158
145
  } mongocrypt_status_type_t;
159
146
 
160
-
161
147
  /**
162
148
  * Create a new status object.
163
149
  *
@@ -168,9 +154,7 @@ typedef enum {
168
154
  * @returns A new status object.
169
155
  */
170
156
  MONGOCRYPT_EXPORT
171
- mongocrypt_status_t *
172
- mongocrypt_status_new (void);
173
-
157
+ mongocrypt_status_t *mongocrypt_status_new(void);
174
158
 
175
159
  /**
176
160
  * Set a status object with message, type, and code.
@@ -189,13 +173,11 @@ mongocrypt_status_new (void);
189
173
  *
190
174
  */
191
175
  MONGOCRYPT_EXPORT
192
- void
193
- mongocrypt_status_set (mongocrypt_status_t *status,
194
- mongocrypt_status_type_t type,
195
- uint32_t code,
196
- const char *message,
197
- int32_t message_len);
198
-
176
+ void mongocrypt_status_set(mongocrypt_status_t *status,
177
+ mongocrypt_status_type_t type,
178
+ uint32_t code,
179
+ const char *message,
180
+ int32_t message_len);
199
181
 
200
182
  /**
201
183
  * Indicates success or the type of error.
@@ -205,9 +187,7 @@ mongocrypt_status_set (mongocrypt_status_t *status,
205
187
  * @returns A @ref mongocrypt_status_type_t.
206
188
  */
207
189
  MONGOCRYPT_EXPORT
208
- mongocrypt_status_type_t
209
- mongocrypt_status_type (mongocrypt_status_t *status);
210
-
190
+ mongocrypt_status_type_t mongocrypt_status_type(mongocrypt_status_t *status);
211
191
 
212
192
  /**
213
193
  * Get an error code or 0.
@@ -217,9 +197,7 @@ mongocrypt_status_type (mongocrypt_status_t *status);
217
197
  * @returns An error code.
218
198
  */
219
199
  MONGOCRYPT_EXPORT
220
- uint32_t
221
- mongocrypt_status_code (mongocrypt_status_t *status);
222
-
200
+ uint32_t mongocrypt_status_code(mongocrypt_status_t *status);
223
201
 
224
202
  /**
225
203
  * Get the error message associated with a status or NULL.
@@ -231,9 +209,7 @@ mongocrypt_status_code (mongocrypt_status_t *status);
231
209
  * @returns A NULL terminated error message or NULL.
232
210
  */
233
211
  MONGOCRYPT_EXPORT
234
- const char *
235
- mongocrypt_status_message (mongocrypt_status_t *status, uint32_t *len);
236
-
212
+ const char *mongocrypt_status_message(mongocrypt_status_t *status, uint32_t *len);
237
213
 
238
214
  /**
239
215
  * Returns true if the status indicates success.
@@ -244,9 +220,7 @@ mongocrypt_status_message (mongocrypt_status_t *status, uint32_t *len);
244
220
  * Retrieve it with @ref mongocrypt_ctx_status
245
221
  */
246
222
  MONGOCRYPT_EXPORT
247
- bool
248
- mongocrypt_status_ok (mongocrypt_status_t *status);
249
-
223
+ bool mongocrypt_status_ok(mongocrypt_status_t *status);
250
224
 
251
225
  /**
252
226
  * Free the memory for a status object.
@@ -254,21 +228,19 @@ mongocrypt_status_ok (mongocrypt_status_t *status);
254
228
  * @param[in] status The status to destroy.
255
229
  */
256
230
  MONGOCRYPT_EXPORT
257
- void
258
- mongocrypt_status_destroy (mongocrypt_status_t *status);
231
+ void mongocrypt_status_destroy(mongocrypt_status_t *status);
259
232
 
260
233
  /**
261
234
  * Indicates the type of log message.
262
235
  */
263
236
  typedef enum {
264
- MONGOCRYPT_LOG_LEVEL_FATAL = 0,
265
- MONGOCRYPT_LOG_LEVEL_ERROR = 1,
266
- MONGOCRYPT_LOG_LEVEL_WARNING = 2,
267
- MONGOCRYPT_LOG_LEVEL_INFO = 3,
268
- MONGOCRYPT_LOG_LEVEL_TRACE = 4
237
+ MONGOCRYPT_LOG_LEVEL_FATAL = 0,
238
+ MONGOCRYPT_LOG_LEVEL_ERROR = 1,
239
+ MONGOCRYPT_LOG_LEVEL_WARNING = 2,
240
+ MONGOCRYPT_LOG_LEVEL_INFO = 3,
241
+ MONGOCRYPT_LOG_LEVEL_TRACE = 4
269
242
  } mongocrypt_log_level_t;
270
243
 
271
-
272
244
  /**
273
245
  * A log callback function. Set a custom log callback with @ref
274
246
  * mongocrypt_setopt_log_handler.
@@ -278,11 +250,7 @@ typedef enum {
278
250
  * @param[in] ctx A context provided by the caller of @ref
279
251
  * mongocrypt_setopt_log_handler.
280
252
  */
281
- typedef void (*mongocrypt_log_fn_t) (mongocrypt_log_level_t level,
282
- const char *message,
283
- uint32_t message_len,
284
- void *ctx);
285
-
253
+ typedef void (*mongocrypt_log_fn_t)(mongocrypt_log_level_t level, const char *message, uint32_t message_len, void *ctx);
286
254
 
287
255
  /**
288
256
  * The top-level handle to libmongocrypt.
@@ -298,7 +266,6 @@ typedef void (*mongocrypt_log_fn_t) (mongocrypt_log_level_t level,
298
266
  */
299
267
  typedef struct _mongocrypt_t mongocrypt_t;
300
268
 
301
-
302
269
  /**
303
270
  * Allocate a new @ref mongocrypt_t object.
304
271
  *
@@ -309,9 +276,7 @@ typedef struct _mongocrypt_t mongocrypt_t;
309
276
  * @returns A new @ref mongocrypt_t object.
310
277
  */
311
278
  MONGOCRYPT_EXPORT
312
- mongocrypt_t *
313
- mongocrypt_new (void);
314
-
279
+ mongocrypt_t *mongocrypt_new(void);
315
280
 
316
281
  /**
317
282
  * Set a handler on the @ref mongocrypt_t object to get called on every log
@@ -326,11 +291,7 @@ mongocrypt_new (void);
326
291
  * Retrieve it with @ref mongocrypt_ctx_status
327
292
  */
328
293
  MONGOCRYPT_EXPORT
329
- bool
330
- mongocrypt_setopt_log_handler (mongocrypt_t *crypt,
331
- mongocrypt_log_fn_t log_fn,
332
- void *log_ctx);
333
-
294
+ bool mongocrypt_setopt_log_handler(mongocrypt_t *crypt, mongocrypt_log_fn_t log_fn, void *log_ctx);
334
295
 
335
296
  /**
336
297
  * Configure an AWS KMS provider on the @ref mongocrypt_t object.
@@ -354,13 +315,11 @@ mongocrypt_setopt_log_handler (mongocrypt_t *crypt,
354
315
  * Retrieve it with @ref mongocrypt_ctx_status
355
316
  */
356
317
  MONGOCRYPT_EXPORT
357
- bool
358
- mongocrypt_setopt_kms_provider_aws (mongocrypt_t *crypt,
359
- const char *aws_access_key_id,
360
- int32_t aws_access_key_id_len,
361
- const char *aws_secret_access_key,
362
- int32_t aws_secret_access_key_len);
363
-
318
+ bool mongocrypt_setopt_kms_provider_aws(mongocrypt_t *crypt,
319
+ const char *aws_access_key_id,
320
+ int32_t aws_access_key_id_len,
321
+ const char *aws_secret_access_key,
322
+ int32_t aws_secret_access_key_len);
364
323
 
365
324
  /**
366
325
  * Configure a local KMS provider on the @ref mongocrypt_t object.
@@ -377,9 +336,7 @@ mongocrypt_setopt_kms_provider_aws (mongocrypt_t *crypt,
377
336
  * Retrieve it with @ref mongocrypt_ctx_status
378
337
  */
379
338
  MONGOCRYPT_EXPORT
380
- bool
381
- mongocrypt_setopt_kms_provider_local (mongocrypt_t *crypt,
382
- mongocrypt_binary_t *key);
339
+ bool mongocrypt_setopt_kms_provider_local(mongocrypt_t *crypt, mongocrypt_binary_t *key);
383
340
 
384
341
  /**
385
342
  * Configure KMS providers with a BSON document.
@@ -393,9 +350,7 @@ mongocrypt_setopt_kms_provider_local (mongocrypt_t *crypt,
393
350
  * Retrieve it with @ref mongocrypt_ctx_status
394
351
  */
395
352
  MONGOCRYPT_EXPORT
396
- bool
397
- mongocrypt_setopt_kms_providers (mongocrypt_t *crypt,
398
- mongocrypt_binary_t *kms_providers);
353
+ bool mongocrypt_setopt_kms_providers(mongocrypt_t *crypt, mongocrypt_binary_t *kms_providers);
399
354
 
400
355
  /**
401
356
  * Set a local schema map for encryption.
@@ -410,9 +365,7 @@ mongocrypt_setopt_kms_providers (mongocrypt_t *crypt,
410
365
  * Retrieve it with @ref mongocrypt_status
411
366
  */
412
367
  MONGOCRYPT_EXPORT
413
- bool
414
- mongocrypt_setopt_schema_map (mongocrypt_t *crypt,
415
- mongocrypt_binary_t *schema_map);
368
+ bool mongocrypt_setopt_schema_map(mongocrypt_t *crypt, mongocrypt_binary_t *schema_map);
416
369
 
417
370
  /**
418
371
  * Set a local EncryptedFieldConfigMap for encryption.
@@ -427,10 +380,7 @@ mongocrypt_setopt_schema_map (mongocrypt_t *crypt,
427
380
  * Retrieve it with @ref mongocrypt_status
428
381
  */
429
382
  MONGOCRYPT_EXPORT
430
- bool
431
- mongocrypt_setopt_encrypted_field_config_map (mongocrypt_t *crypt,
432
- mongocrypt_binary_t *efc_map);
433
-
383
+ bool mongocrypt_setopt_encrypted_field_config_map(mongocrypt_t *crypt, mongocrypt_binary_t *efc_map);
434
384
 
435
385
  /**
436
386
  * @brief Append an additional search directory to the search path for loading
@@ -461,10 +411,7 @@ mongocrypt_setopt_encrypted_field_config_map (mongocrypt_t *crypt,
461
411
  * appended here will have no effect.
462
412
  */
463
413
  MONGOCRYPT_EXPORT
464
- void
465
- mongocrypt_setopt_append_crypt_shared_lib_search_path (mongocrypt_t *crypt,
466
- const char *path);
467
-
414
+ void mongocrypt_setopt_append_crypt_shared_lib_search_path(mongocrypt_t *crypt, const char *path);
468
415
 
469
416
  /**
470
417
  * @brief Set a single override path for loading the crypt_shared dynamic
@@ -490,10 +437,7 @@ mongocrypt_setopt_append_crypt_shared_lib_search_path (mongocrypt_t *crypt,
490
437
  * the initialization of mongocrypt_t will fail with an error.
491
438
  */
492
439
  MONGOCRYPT_EXPORT
493
- void
494
- mongocrypt_setopt_set_crypt_shared_lib_path_override (mongocrypt_t *crypt,
495
- const char *path);
496
-
440
+ void mongocrypt_setopt_set_crypt_shared_lib_path_override(mongocrypt_t *crypt, const char *path);
497
441
 
498
442
  /**
499
443
  * @brief Opt-into handling the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS state.
@@ -510,9 +454,7 @@ mongocrypt_setopt_set_crypt_shared_lib_path_override (mongocrypt_t *crypt,
510
454
  * @param[in] crypt The @ref mongocrypt_t object to update
511
455
  */
512
456
  MONGOCRYPT_EXPORT
513
- void
514
- mongocrypt_setopt_use_need_kms_credentials_state (mongocrypt_t *crypt);
515
-
457
+ void mongocrypt_setopt_use_need_kms_credentials_state(mongocrypt_t *crypt);
516
458
 
517
459
  /**
518
460
  * Initialize new @ref mongocrypt_t object.
@@ -528,9 +470,7 @@ mongocrypt_setopt_use_need_kms_credentials_state (mongocrypt_t *crypt);
528
470
  * options are invalid.
529
471
  */
530
472
  MONGOCRYPT_EXPORT
531
- bool
532
- mongocrypt_init (mongocrypt_t *crypt);
533
-
473
+ bool mongocrypt_init(mongocrypt_t *crypt);
534
474
 
535
475
  /**
536
476
  * Get the status associated with a @ref mongocrypt_t object.
@@ -542,9 +482,7 @@ mongocrypt_init (mongocrypt_t *crypt);
542
482
  * Retrieve it with @ref mongocrypt_ctx_status
543
483
  */
544
484
  MONGOCRYPT_EXPORT
545
- bool
546
- mongocrypt_status (mongocrypt_t *crypt, mongocrypt_status_t *status);
547
-
485
+ bool mongocrypt_status(mongocrypt_t *crypt, mongocrypt_status_t *status);
548
486
 
549
487
  /**
550
488
  * Destroy the @ref mongocrypt_t object.
@@ -552,8 +490,7 @@ mongocrypt_status (mongocrypt_t *crypt, mongocrypt_status_t *status);
552
490
  * @param[in] crypt The @ref mongocrypt_t object to destroy.
553
491
  */
554
492
  MONGOCRYPT_EXPORT
555
- void
556
- mongocrypt_destroy (mongocrypt_t *crypt);
493
+ void mongocrypt_destroy(mongocrypt_t *crypt);
557
494
 
558
495
  /**
559
496
  * Obtain a nul-terminated version string of the loaded crypt_shared dynamic
@@ -574,10 +511,7 @@ mongocrypt_destroy (mongocrypt_t *crypt);
574
511
  * @ref mongocrypt_crypt_shared_lib_version.
575
512
  */
576
513
  MONGOCRYPT_EXPORT
577
- const char *
578
- mongocrypt_crypt_shared_lib_version_string (const mongocrypt_t *crypt,
579
- uint32_t *len);
580
-
514
+ const char *mongocrypt_crypt_shared_lib_version_string(const mongocrypt_t *crypt, uint32_t *len);
581
515
 
582
516
  /**
583
517
  * @brief Obtain a 64-bit constant encoding the version of the loaded
@@ -599,16 +533,13 @@ mongocrypt_crypt_shared_lib_version_string (const mongocrypt_t *crypt,
599
533
  * For example, version 6.2.1 would be encoded as: 0x0006'0002'0001'0000
600
534
  */
601
535
  MONGOCRYPT_EXPORT
602
- uint64_t
603
- mongocrypt_crypt_shared_lib_version (const mongocrypt_t *crypt);
604
-
536
+ uint64_t mongocrypt_crypt_shared_lib_version(const mongocrypt_t *crypt);
605
537
 
606
538
  /**
607
539
  * Manages the state machine for encryption or decryption.
608
540
  */
609
541
  typedef struct _mongocrypt_ctx_t mongocrypt_ctx_t;
610
542
 
611
-
612
543
  /**
613
544
  * Create a new uninitialized @ref mongocrypt_ctx_t.
614
545
  *
@@ -619,9 +550,7 @@ typedef struct _mongocrypt_ctx_t mongocrypt_ctx_t;
619
550
  * @returns A new context.
620
551
  */
621
552
  MONGOCRYPT_EXPORT
622
- mongocrypt_ctx_t *
623
- mongocrypt_ctx_new (mongocrypt_t *crypt);
624
-
553
+ mongocrypt_ctx_t *mongocrypt_ctx_new(mongocrypt_t *crypt);
625
554
 
626
555
  /**
627
556
  * Get the status associated with a @ref mongocrypt_ctx_t object.
@@ -635,9 +564,7 @@ mongocrypt_ctx_new (mongocrypt_t *crypt);
635
564
  * @see mongocrypt_status_ok
636
565
  */
637
566
  MONGOCRYPT_EXPORT
638
- bool
639
- mongocrypt_ctx_status (mongocrypt_ctx_t *ctx, mongocrypt_status_t *status);
640
-
567
+ bool mongocrypt_ctx_status(mongocrypt_ctx_t *ctx, mongocrypt_status_t *status);
641
568
 
642
569
  /**
643
570
  * Set the key id to use for explicit encryption.
@@ -654,9 +581,7 @@ mongocrypt_ctx_status (mongocrypt_ctx_t *ctx, mongocrypt_status_t *status);
654
581
  * Retrieve it with @ref mongocrypt_ctx_status
655
582
  */
656
583
  MONGOCRYPT_EXPORT
657
- bool
658
- mongocrypt_ctx_setopt_key_id (mongocrypt_ctx_t *ctx,
659
- mongocrypt_binary_t *key_id);
584
+ bool mongocrypt_ctx_setopt_key_id(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_id);
660
585
 
661
586
  /**
662
587
  * Set the keyAltName to use for explicit encryption or
@@ -681,9 +606,7 @@ mongocrypt_ctx_setopt_key_id (mongocrypt_ctx_t *ctx,
681
606
  * Retrieve it with @ref mongocrypt_ctx_status
682
607
  */
683
608
  MONGOCRYPT_EXPORT
684
- bool
685
- mongocrypt_ctx_setopt_key_alt_name (mongocrypt_ctx_t *ctx,
686
- mongocrypt_binary_t *key_alt_name);
609
+ bool mongocrypt_ctx_setopt_key_alt_name(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_alt_name);
687
610
 
688
611
  /**
689
612
  * Set the keyMaterial to use for encrypting data.
@@ -701,9 +624,7 @@ mongocrypt_ctx_setopt_key_alt_name (mongocrypt_ctx_t *ctx,
701
624
  * Retrieve it with @ref mongocrypt_ctx_status
702
625
  */
703
626
  MONGOCRYPT_EXPORT
704
- bool
705
- mongocrypt_ctx_setopt_key_material (mongocrypt_ctx_t *ctx,
706
- mongocrypt_binary_t *key_material);
627
+ bool mongocrypt_ctx_setopt_key_material(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_material);
707
628
 
708
629
  /**
709
630
  * Set the algorithm used for encryption to either
@@ -726,14 +647,10 @@ mongocrypt_ctx_setopt_key_material (mongocrypt_ctx_t *ctx,
726
647
  * Retrieve it with @ref mongocrypt_ctx_status
727
648
  */
728
649
  MONGOCRYPT_EXPORT
729
- bool
730
- mongocrypt_ctx_setopt_algorithm (mongocrypt_ctx_t *ctx,
731
- const char *algorithm,
732
- int len);
650
+ bool mongocrypt_ctx_setopt_algorithm(mongocrypt_ctx_t *ctx, const char *algorithm, int len);
733
651
 
734
652
  /// String constant for setopt_algorithm "Deterministic" encryption
735
- #define MONGOCRYPT_ALGORITHM_DETERMINISTIC_STR \
736
- "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
653
+ #define MONGOCRYPT_ALGORITHM_DETERMINISTIC_STR "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
737
654
  /// String constant for setopt_algorithm "Random" encryption
738
655
  #define MONGOCRYPT_ALGORITHM_RANDOM_STR "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
739
656
  /// String constant for setopt_algorithm "Indexed" explicit encryption
@@ -745,7 +662,6 @@ mongocrypt_ctx_setopt_algorithm (mongocrypt_ctx_t *ctx,
745
662
  /// for public use.
746
663
  #define MONGOCRYPT_ALGORITHM_RANGEPREVIEW_STR "RangePreview"
747
664
 
748
-
749
665
  /**
750
666
  * Identify the AWS KMS master key to use for creating a data key.
751
667
  *
@@ -765,13 +681,11 @@ mongocrypt_ctx_setopt_algorithm (mongocrypt_ctx_t *ctx,
765
681
  * Retrieve it with @ref mongocrypt_ctx_status
766
682
  */
767
683
  MONGOCRYPT_EXPORT
768
- bool
769
- mongocrypt_ctx_setopt_masterkey_aws (mongocrypt_ctx_t *ctx,
770
- const char *region,
771
- int32_t region_len,
772
- const char *cmk,
773
- int32_t cmk_len);
774
-
684
+ bool mongocrypt_ctx_setopt_masterkey_aws(mongocrypt_ctx_t *ctx,
685
+ const char *region,
686
+ int32_t region_len,
687
+ const char *cmk,
688
+ int32_t cmk_len);
775
689
 
776
690
  /**
777
691
  * Identify a custom AWS endpoint when creating a data key.
@@ -791,10 +705,7 @@ mongocrypt_ctx_setopt_masterkey_aws (mongocrypt_ctx_t *ctx,
791
705
  * Retrieve it with @ref mongocrypt_ctx_status
792
706
  */
793
707
  MONGOCRYPT_EXPORT
794
- bool
795
- mongocrypt_ctx_setopt_masterkey_aws_endpoint (mongocrypt_ctx_t *ctx,
796
- const char *endpoint,
797
- int32_t endpoint_len);
708
+ bool mongocrypt_ctx_setopt_masterkey_aws_endpoint(mongocrypt_ctx_t *ctx, const char *endpoint, int32_t endpoint_len);
798
709
 
799
710
  /**
800
711
  * Set the master key to "local" for creating a data key.
@@ -807,8 +718,7 @@ mongocrypt_ctx_setopt_masterkey_aws_endpoint (mongocrypt_ctx_t *ctx,
807
718
  * Retrieve it with @ref mongocrypt_ctx_status
808
719
  */
809
720
  MONGOCRYPT_EXPORT
810
- bool
811
- mongocrypt_ctx_setopt_masterkey_local (mongocrypt_ctx_t *ctx);
721
+ bool mongocrypt_ctx_setopt_masterkey_local(mongocrypt_ctx_t *ctx);
812
722
 
813
723
  /**
814
724
  * Set key encryption key document for creating a data key or for rewrapping
@@ -862,10 +772,7 @@ mongocrypt_ctx_setopt_masterkey_local (mongocrypt_ctx_t *ctx);
862
772
  * Retrieve it with @ref mongocrypt_ctx_status.
863
773
  */
864
774
  MONGOCRYPT_EXPORT
865
- bool
866
- mongocrypt_ctx_setopt_key_encryption_key (mongocrypt_ctx_t *ctx,
867
- mongocrypt_binary_t *bin);
868
-
775
+ bool mongocrypt_ctx_setopt_key_encryption_key(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *bin);
869
776
 
870
777
  /**
871
778
  * Initialize a context to create a data key.
@@ -882,8 +789,7 @@ mongocrypt_ctx_setopt_key_encryption_key (mongocrypt_ctx_t *ctx,
882
789
  * has been set on the parent @ref mongocrypt_t.
883
790
  */
884
791
  MONGOCRYPT_EXPORT
885
- bool
886
- mongocrypt_ctx_datakey_init (mongocrypt_ctx_t *ctx);
792
+ bool mongocrypt_ctx_datakey_init(mongocrypt_ctx_t *ctx);
887
793
 
888
794
  /**
889
795
  * Initialize a context for encryption.
@@ -900,11 +806,7 @@ mongocrypt_ctx_datakey_init (mongocrypt_ctx_t *ctx);
900
806
  * Retrieve it with @ref mongocrypt_ctx_status
901
807
  */
902
808
  MONGOCRYPT_EXPORT
903
- bool
904
- mongocrypt_ctx_encrypt_init (mongocrypt_ctx_t *ctx,
905
- const char *db,
906
- int32_t db_len,
907
- mongocrypt_binary_t *cmd);
809
+ bool mongocrypt_ctx_encrypt_init(mongocrypt_ctx_t *ctx, const char *db, int32_t db_len, mongocrypt_binary_t *cmd);
908
810
 
909
811
  /**
910
812
  * Explicit helper method to encrypt a single BSON object. Contexts
@@ -942,9 +844,7 @@ mongocrypt_ctx_encrypt_init (mongocrypt_ctx_t *ctx,
942
844
  * Retrieve it with @ref mongocrypt_ctx_status
943
845
  */
944
846
  MONGOCRYPT_EXPORT
945
- bool
946
- mongocrypt_ctx_explicit_encrypt_init (mongocrypt_ctx_t *ctx,
947
- mongocrypt_binary_t *msg);
847
+ bool mongocrypt_ctx_explicit_encrypt_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *msg);
948
848
 
949
849
  /**
950
850
  * Explicit helper method to encrypt a Match Expression or Aggregate Expression.
@@ -991,10 +891,7 @@ mongocrypt_ctx_explicit_encrypt_init (mongocrypt_ctx_t *ctx,
991
891
  * Retrieve it with @ref mongocrypt_ctx_status
992
892
  */
993
893
  MONGOCRYPT_EXPORT
994
- bool
995
- mongocrypt_ctx_explicit_encrypt_expression_init (mongocrypt_ctx_t *ctx,
996
- mongocrypt_binary_t *msg);
997
-
894
+ bool mongocrypt_ctx_explicit_encrypt_expression_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *msg);
998
895
 
999
896
  /**
1000
897
  * Initialize a context for decryption.
@@ -1010,9 +907,7 @@ mongocrypt_ctx_explicit_encrypt_expression_init (mongocrypt_ctx_t *ctx,
1010
907
  * Retrieve it with @ref mongocrypt_ctx_status
1011
908
  */
1012
909
  MONGOCRYPT_EXPORT
1013
- bool
1014
- mongocrypt_ctx_decrypt_init (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *doc);
1015
-
910
+ bool mongocrypt_ctx_decrypt_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *doc);
1016
911
 
1017
912
  /**
1018
913
  * Explicit helper method to decrypt a single BSON object.
@@ -1028,10 +923,7 @@ mongocrypt_ctx_decrypt_init (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *doc);
1028
923
  * immediately after.
1029
924
  */
1030
925
  MONGOCRYPT_EXPORT
1031
- bool
1032
- mongocrypt_ctx_explicit_decrypt_init (mongocrypt_ctx_t *ctx,
1033
- mongocrypt_binary_t *msg);
1034
-
926
+ bool mongocrypt_ctx_explicit_decrypt_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *msg);
1035
927
 
1036
928
  /**
1037
929
  * @brief Initialize a context to rewrap datakeys.
@@ -1046,10 +938,7 @@ mongocrypt_ctx_explicit_decrypt_init (mongocrypt_ctx_t *ctx,
1046
938
  * Retrieve it with @ref mongocrypt_ctx_status.
1047
939
  */
1048
940
  MONGOCRYPT_EXPORT
1049
- bool
1050
- mongocrypt_ctx_rewrap_many_datakey_init (mongocrypt_ctx_t *ctx,
1051
- mongocrypt_binary_t *filter);
1052
-
941
+ bool mongocrypt_ctx_rewrap_many_datakey_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *filter);
1053
942
 
1054
943
  /**
1055
944
  * Indicates the state of the @ref mongocrypt_ctx_t. Each state requires
@@ -1058,17 +947,16 @@ mongocrypt_ctx_rewrap_many_datakey_init (mongocrypt_ctx_t *ctx,
1058
947
  * for information on what to do for each state.
1059
948
  */
1060
949
  typedef enum {
1061
- MONGOCRYPT_CTX_ERROR = 0,
1062
- MONGOCRYPT_CTX_NEED_MONGO_COLLINFO = 1, /* run on main MongoClient */
1063
- MONGOCRYPT_CTX_NEED_MONGO_MARKINGS = 2, /* run on mongocryptd. */
1064
- MONGOCRYPT_CTX_NEED_MONGO_KEYS = 3, /* run on key vault */
1065
- MONGOCRYPT_CTX_NEED_KMS = 4,
1066
- MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS = 7, /* fetch/renew KMS credentials */
1067
- MONGOCRYPT_CTX_READY = 5, /* ready for encryption/decryption */
1068
- MONGOCRYPT_CTX_DONE = 6,
950
+ MONGOCRYPT_CTX_ERROR = 0,
951
+ MONGOCRYPT_CTX_NEED_MONGO_COLLINFO = 1, /* run on main MongoClient */
952
+ MONGOCRYPT_CTX_NEED_MONGO_MARKINGS = 2, /* run on mongocryptd. */
953
+ MONGOCRYPT_CTX_NEED_MONGO_KEYS = 3, /* run on key vault */
954
+ MONGOCRYPT_CTX_NEED_KMS = 4,
955
+ MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS = 7, /* fetch/renew KMS credentials */
956
+ MONGOCRYPT_CTX_READY = 5, /* ready for encryption/decryption */
957
+ MONGOCRYPT_CTX_DONE = 6,
1069
958
  } mongocrypt_ctx_state_t;
1070
959
 
1071
-
1072
960
  /**
1073
961
  * Get the current state of a context.
1074
962
  *
@@ -1076,9 +964,7 @@ typedef enum {
1076
964
  * @returns A @ref mongocrypt_ctx_state_t.
1077
965
  */
1078
966
  MONGOCRYPT_EXPORT
1079
- mongocrypt_ctx_state_t
1080
- mongocrypt_ctx_state (mongocrypt_ctx_t *ctx);
1081
-
967
+ mongocrypt_ctx_state_t mongocrypt_ctx_state(mongocrypt_ctx_t *ctx);
1082
968
 
1083
969
  /**
1084
970
  * Get BSON necessary to run the mongo operation when mongocrypt_ctx_t
@@ -1101,9 +987,7 @@ mongocrypt_ctx_state (mongocrypt_ctx_t *ctx);
1101
987
  * Retrieve it with @ref mongocrypt_ctx_status
1102
988
  */
1103
989
  MONGOCRYPT_EXPORT
1104
- bool
1105
- mongocrypt_ctx_mongo_op (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *op_bson);
1106
-
990
+ bool mongocrypt_ctx_mongo_op(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *op_bson);
1107
991
 
1108
992
  /**
1109
993
  * Feed a BSON reply or result when mongocrypt_ctx_t is in
@@ -1128,9 +1012,7 @@ mongocrypt_ctx_mongo_op (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *op_bson);
1128
1012
  * Retrieve it with @ref mongocrypt_ctx_status
1129
1013
  */
1130
1014
  MONGOCRYPT_EXPORT
1131
- bool
1132
- mongocrypt_ctx_mongo_feed (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *reply);
1133
-
1015
+ bool mongocrypt_ctx_mongo_feed(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *reply);
1134
1016
 
1135
1017
  /**
1136
1018
  * Call when done feeding the reply (or replies) back to the context.
@@ -1140,16 +1022,13 @@ mongocrypt_ctx_mongo_feed (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *reply);
1140
1022
  * Retrieve it with @ref mongocrypt_ctx_status
1141
1023
  */
1142
1024
  MONGOCRYPT_EXPORT
1143
- bool
1144
- mongocrypt_ctx_mongo_done (mongocrypt_ctx_t *ctx);
1145
-
1025
+ bool mongocrypt_ctx_mongo_done(mongocrypt_ctx_t *ctx);
1146
1026
 
1147
1027
  /**
1148
1028
  * Manages a single KMS HTTP request/response.
1149
1029
  */
1150
1030
  typedef struct _mongocrypt_kms_ctx_t mongocrypt_kms_ctx_t;
1151
1031
 
1152
-
1153
1032
  /**
1154
1033
  * Get the next KMS handle.
1155
1034
  *
@@ -1164,9 +1043,7 @@ typedef struct _mongocrypt_kms_ctx_t mongocrypt_kms_ctx_t;
1164
1043
  * @returns a new @ref mongocrypt_kms_ctx_t or NULL.
1165
1044
  */
1166
1045
  MONGOCRYPT_EXPORT
1167
- mongocrypt_kms_ctx_t *
1168
- mongocrypt_ctx_next_kms_ctx (mongocrypt_ctx_t *ctx);
1169
-
1046
+ mongocrypt_kms_ctx_t *mongocrypt_ctx_next_kms_ctx(mongocrypt_ctx_t *ctx);
1170
1047
 
1171
1048
  /**
1172
1049
  * Get the HTTP request message for a KMS handle.
@@ -1182,10 +1059,7 @@ mongocrypt_ctx_next_kms_ctx (mongocrypt_ctx_t *ctx);
1182
1059
  * Retrieve it with @ref mongocrypt_kms_ctx_status
1183
1060
  */
1184
1061
  MONGOCRYPT_EXPORT
1185
- bool
1186
- mongocrypt_kms_ctx_message (mongocrypt_kms_ctx_t *kms,
1187
- mongocrypt_binary_t *msg);
1188
-
1062
+ bool mongocrypt_kms_ctx_message(mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *msg);
1189
1063
 
1190
1064
  /**
1191
1065
  * Get the hostname from which to connect over TLS.
@@ -1202,9 +1076,7 @@ mongocrypt_kms_ctx_message (mongocrypt_kms_ctx_t *kms,
1202
1076
  * Retrieve it with @ref mongocrypt_kms_ctx_status
1203
1077
  */
1204
1078
  MONGOCRYPT_EXPORT
1205
- bool
1206
- mongocrypt_kms_ctx_endpoint (mongocrypt_kms_ctx_t *kms, const char **endpoint);
1207
-
1079
+ bool mongocrypt_kms_ctx_endpoint(mongocrypt_kms_ctx_t *kms, const char **endpoint);
1208
1080
 
1209
1081
  /**
1210
1082
  * Indicates how many bytes to feed into @ref mongocrypt_kms_ctx_feed.
@@ -1213,9 +1085,7 @@ mongocrypt_kms_ctx_endpoint (mongocrypt_kms_ctx_t *kms, const char **endpoint);
1213
1085
  * @returns The number of requested bytes.
1214
1086
  */
1215
1087
  MONGOCRYPT_EXPORT
1216
- uint32_t
1217
- mongocrypt_kms_ctx_bytes_needed (mongocrypt_kms_ctx_t *kms);
1218
-
1088
+ uint32_t mongocrypt_kms_ctx_bytes_needed(mongocrypt_kms_ctx_t *kms);
1219
1089
 
1220
1090
  /**
1221
1091
  * Feed bytes from the HTTP response.
@@ -1230,9 +1100,7 @@ mongocrypt_kms_ctx_bytes_needed (mongocrypt_kms_ctx_t *kms);
1230
1100
  * Retrieve it with @ref mongocrypt_kms_ctx_status
1231
1101
  */
1232
1102
  MONGOCRYPT_EXPORT
1233
- bool
1234
- mongocrypt_kms_ctx_feed (mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes);
1235
-
1103
+ bool mongocrypt_kms_ctx_feed(mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes);
1236
1104
 
1237
1105
  /**
1238
1106
  * Get the status associated with a @ref mongocrypt_kms_ctx_t object.
@@ -1243,9 +1111,7 @@ mongocrypt_kms_ctx_feed (mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes);
1243
1111
  * @returns A boolean indicating success. If false, an error status is set.
1244
1112
  */
1245
1113
  MONGOCRYPT_EXPORT
1246
- bool
1247
- mongocrypt_kms_ctx_status (mongocrypt_kms_ctx_t *kms,
1248
- mongocrypt_status_t *status);
1114
+ bool mongocrypt_kms_ctx_status(mongocrypt_kms_ctx_t *kms, mongocrypt_status_t *status);
1249
1115
 
1250
1116
  /**
1251
1117
  * Get the KMS provider identifier associated with this KMS request.
@@ -1263,9 +1129,7 @@ mongocrypt_kms_ctx_status (mongocrypt_kms_ctx_t *kms,
1263
1129
  * "kmip".
1264
1130
  */
1265
1131
  MONGOCRYPT_EXPORT
1266
- const char *
1267
- mongocrypt_kms_ctx_get_kms_provider (mongocrypt_kms_ctx_t *kms, uint32_t *len);
1268
-
1132
+ const char *mongocrypt_kms_ctx_get_kms_provider(mongocrypt_kms_ctx_t *kms, uint32_t *len);
1269
1133
 
1270
1134
  /**
1271
1135
  * Call when done handling all KMS contexts.
@@ -1276,9 +1140,7 @@ mongocrypt_kms_ctx_get_kms_provider (mongocrypt_kms_ctx_t *kms, uint32_t *len);
1276
1140
  * Retrieve it with @ref mongocrypt_ctx_status
1277
1141
  */
1278
1142
  MONGOCRYPT_EXPORT
1279
- bool
1280
- mongocrypt_ctx_kms_done (mongocrypt_ctx_t *ctx);
1281
-
1143
+ bool mongocrypt_ctx_kms_done(mongocrypt_ctx_t *ctx);
1282
1144
 
1283
1145
  /**
1284
1146
  * Call in response to the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS state
@@ -1295,9 +1157,7 @@ mongocrypt_ctx_kms_done (mongocrypt_ctx_t *ctx);
1295
1157
  * Retrieve it with @ref mongocrypt_ctx_status.
1296
1158
  */
1297
1159
  MONGOCRYPT_EXPORT
1298
- bool
1299
- mongocrypt_ctx_provide_kms_providers (
1300
- mongocrypt_ctx_t *ctx, mongocrypt_binary_t *kms_providers_definition);
1160
+ bool mongocrypt_ctx_provide_kms_providers(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *kms_providers_definition);
1301
1161
 
1302
1162
  /**
1303
1163
  * Perform the final encryption or decryption.
@@ -1336,9 +1196,7 @@ mongocrypt_ctx_provide_kms_providers (
1336
1196
  * Retrieve it with @ref mongocrypt_ctx_status
1337
1197
  */
1338
1198
  MONGOCRYPT_EXPORT
1339
- bool
1340
- mongocrypt_ctx_finalize (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *out);
1341
-
1199
+ bool mongocrypt_ctx_finalize(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *out);
1342
1200
 
1343
1201
  /**
1344
1202
  * Destroy and free all memory associated with a @ref mongocrypt_ctx_t.
@@ -1346,8 +1204,7 @@ mongocrypt_ctx_finalize (mongocrypt_ctx_t *ctx, mongocrypt_binary_t *out);
1346
1204
  * @param[in] ctx A @ref mongocrypt_ctx_t.
1347
1205
  */
1348
1206
  MONGOCRYPT_EXPORT
1349
- void
1350
- mongocrypt_ctx_destroy (mongocrypt_ctx_t *ctx);
1207
+ void mongocrypt_ctx_destroy(mongocrypt_ctx_t *ctx);
1351
1208
 
1352
1209
  /**
1353
1210
  * An crypto AES-256-CBC encrypt or decrypt function.
@@ -1366,13 +1223,13 @@ mongocrypt_ctx_destroy (mongocrypt_ctx_t *ctx);
1366
1223
  * @returns A boolean indicating success. If returning false, set @p status
1367
1224
  * with a message indiciating the error using @ref mongocrypt_status_set.
1368
1225
  */
1369
- typedef bool (*mongocrypt_crypto_fn) (void *ctx,
1370
- mongocrypt_binary_t *key,
1371
- mongocrypt_binary_t *iv,
1372
- mongocrypt_binary_t *in,
1373
- mongocrypt_binary_t *out,
1374
- uint32_t *bytes_written,
1375
- mongocrypt_status_t *status);
1226
+ typedef bool (*mongocrypt_crypto_fn)(void *ctx,
1227
+ mongocrypt_binary_t *key,
1228
+ mongocrypt_binary_t *iv,
1229
+ mongocrypt_binary_t *in,
1230
+ mongocrypt_binary_t *out,
1231
+ uint32_t *bytes_written,
1232
+ mongocrypt_status_t *status);
1376
1233
 
1377
1234
  /**
1378
1235
  * A crypto signature or HMAC function.
@@ -1391,12 +1248,11 @@ typedef bool (*mongocrypt_crypto_fn) (void *ctx,
1391
1248
  * @returns A boolean indicating success. If returning false, set @p status
1392
1249
  * with a message indiciating the error using @ref mongocrypt_status_set.
1393
1250
  */
1394
- typedef bool (*mongocrypt_hmac_fn) (void *ctx,
1395
- mongocrypt_binary_t *key,
1396
- mongocrypt_binary_t *in,
1397
- mongocrypt_binary_t *out,
1398
- mongocrypt_status_t *status);
1399
-
1251
+ typedef bool (*mongocrypt_hmac_fn)(void *ctx,
1252
+ mongocrypt_binary_t *key,
1253
+ mongocrypt_binary_t *in,
1254
+ mongocrypt_binary_t *out,
1255
+ mongocrypt_status_t *status);
1400
1256
 
1401
1257
  /**
1402
1258
  * A crypto hash (SHA-256) function.
@@ -1411,10 +1267,10 @@ typedef bool (*mongocrypt_hmac_fn) (void *ctx,
1411
1267
  * @returns A boolean indicating success. If returning false, set @p status
1412
1268
  * with a message indiciating the error using @ref mongocrypt_status_set.
1413
1269
  */
1414
- typedef bool (*mongocrypt_hash_fn) (void *ctx,
1415
- mongocrypt_binary_t *in,
1416
- mongocrypt_binary_t *out,
1417
- mongocrypt_status_t *status);
1270
+ typedef bool (*mongocrypt_hash_fn)(void *ctx,
1271
+ mongocrypt_binary_t *in,
1272
+ mongocrypt_binary_t *out,
1273
+ mongocrypt_status_t *status);
1418
1274
 
1419
1275
  /**
1420
1276
  * A crypto secure random function.
@@ -1429,21 +1285,17 @@ typedef bool (*mongocrypt_hash_fn) (void *ctx,
1429
1285
  * @returns A boolean indicating success. If returning false, set @p status
1430
1286
  * with a message indiciating the error using @ref mongocrypt_status_set.
1431
1287
  */
1432
- typedef bool (*mongocrypt_random_fn) (void *ctx,
1433
- mongocrypt_binary_t *out,
1434
- uint32_t count,
1435
- mongocrypt_status_t *status);
1288
+ typedef bool (*mongocrypt_random_fn)(void *ctx, mongocrypt_binary_t *out, uint32_t count, mongocrypt_status_t *status);
1436
1289
 
1437
1290
  MONGOCRYPT_EXPORT
1438
- bool
1439
- mongocrypt_setopt_crypto_hooks (mongocrypt_t *crypt,
1440
- mongocrypt_crypto_fn aes_256_cbc_encrypt,
1441
- mongocrypt_crypto_fn aes_256_cbc_decrypt,
1442
- mongocrypt_random_fn random,
1443
- mongocrypt_hmac_fn hmac_sha_512,
1444
- mongocrypt_hmac_fn hmac_sha_256,
1445
- mongocrypt_hash_fn sha_256,
1446
- void *ctx);
1291
+ bool mongocrypt_setopt_crypto_hooks(mongocrypt_t *crypt,
1292
+ mongocrypt_crypto_fn aes_256_cbc_encrypt,
1293
+ mongocrypt_crypto_fn aes_256_cbc_decrypt,
1294
+ mongocrypt_random_fn random,
1295
+ mongocrypt_hmac_fn hmac_sha_512,
1296
+ mongocrypt_hmac_fn hmac_sha_256,
1297
+ mongocrypt_hash_fn sha_256,
1298
+ void *ctx);
1447
1299
 
1448
1300
  /**
1449
1301
  * Set a crypto hook for the AES256-CTR operations.
@@ -1461,11 +1313,10 @@ mongocrypt_setopt_crypto_hooks (mongocrypt_t *crypt,
1461
1313
  *
1462
1314
  */
1463
1315
  MONGOCRYPT_EXPORT
1464
- bool
1465
- mongocrypt_setopt_aes_256_ctr (mongocrypt_t *crypt,
1466
- mongocrypt_crypto_fn aes_256_ctr_encrypt,
1467
- mongocrypt_crypto_fn aes_256_ctr_decrypt,
1468
- void *ctx);
1316
+ bool mongocrypt_setopt_aes_256_ctr(mongocrypt_t *crypt,
1317
+ mongocrypt_crypto_fn aes_256_ctr_encrypt,
1318
+ mongocrypt_crypto_fn aes_256_ctr_decrypt,
1319
+ void *ctx);
1469
1320
 
1470
1321
  /**
1471
1322
  * Set an AES256-ECB crypto hook for the AES256-CTR operations. If CTR hook was
@@ -1483,10 +1334,7 @@ mongocrypt_setopt_aes_256_ctr (mongocrypt_t *crypt,
1483
1334
  *
1484
1335
  */
1485
1336
  MONGOCRYPT_EXPORT
1486
- bool
1487
- mongocrypt_setopt_aes_256_ecb (mongocrypt_t *crypt,
1488
- mongocrypt_crypto_fn aes_256_ecb_encrypt,
1489
- void *ctx);
1337
+ bool mongocrypt_setopt_aes_256_ecb(mongocrypt_t *crypt, mongocrypt_crypto_fn aes_256_ecb_encrypt, void *ctx);
1490
1338
 
1491
1339
  /**
1492
1340
  * Set a crypto hook for the RSASSA-PKCS1-v1_5 algorithm with a SHA-256 hash.
@@ -1506,11 +1354,9 @@ mongocrypt_setopt_aes_256_ecb (mongocrypt_t *crypt,
1506
1354
  *
1507
1355
  */
1508
1356
  MONGOCRYPT_EXPORT
1509
- bool
1510
- mongocrypt_setopt_crypto_hook_sign_rsaes_pkcs1_v1_5 (
1511
- mongocrypt_t *crypt,
1512
- mongocrypt_hmac_fn sign_rsaes_pkcs1_v1_5,
1513
- void *sign_ctx);
1357
+ bool mongocrypt_setopt_crypto_hook_sign_rsaes_pkcs1_v1_5(mongocrypt_t *crypt,
1358
+ mongocrypt_hmac_fn sign_rsaes_pkcs1_v1_5,
1359
+ void *sign_ctx);
1514
1360
 
1515
1361
  /**
1516
1362
  * @brief Opt-into skipping query analysis.
@@ -1522,8 +1368,7 @@ mongocrypt_setopt_crypto_hook_sign_rsaes_pkcs1_v1_5 (
1522
1368
  * @param[in] crypt The @ref mongocrypt_t object to update
1523
1369
  */
1524
1370
  MONGOCRYPT_EXPORT
1525
- void
1526
- mongocrypt_setopt_bypass_query_analysis (mongocrypt_t *crypt);
1371
+ void mongocrypt_setopt_bypass_query_analysis(mongocrypt_t *crypt);
1527
1372
 
1528
1373
  /**
1529
1374
  * Set the contention factor used for explicit encryption.
@@ -1536,9 +1381,7 @@ mongocrypt_setopt_bypass_query_analysis (mongocrypt_t *crypt);
1536
1381
  * Retrieve it with @ref mongocrypt_ctx_status.
1537
1382
  */
1538
1383
  MONGOCRYPT_EXPORT
1539
- bool
1540
- mongocrypt_ctx_setopt_contention_factor (mongocrypt_ctx_t *ctx,
1541
- int64_t contention_factor);
1384
+ bool mongocrypt_ctx_setopt_contention_factor(mongocrypt_ctx_t *ctx, int64_t contention_factor);
1542
1385
 
1543
1386
  /**
1544
1387
  * Set the index key id to use for explicit Queryable Encryption.
@@ -1556,10 +1399,7 @@ mongocrypt_ctx_setopt_contention_factor (mongocrypt_ctx_t *ctx,
1556
1399
  * Retrieve it with @ref mongocrypt_ctx_status
1557
1400
  */
1558
1401
  MONGOCRYPT_EXPORT
1559
- bool
1560
- mongocrypt_ctx_setopt_index_key_id (mongocrypt_ctx_t *ctx,
1561
- mongocrypt_binary_t *key_id);
1562
-
1402
+ bool mongocrypt_ctx_setopt_index_key_id(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_id);
1563
1403
 
1564
1404
  /**
1565
1405
  * Set the query type to use for explicit Queryable Encryption.
@@ -1572,10 +1412,7 @@ mongocrypt_ctx_setopt_index_key_id (mongocrypt_ctx_t *ctx,
1572
1412
  * Retrieve it with @ref mongocrypt_ctx_status
1573
1413
  */
1574
1414
  MONGOCRYPT_EXPORT
1575
- bool
1576
- mongocrypt_ctx_setopt_query_type (mongocrypt_ctx_t *ctx,
1577
- const char *query_type,
1578
- int len);
1415
+ bool mongocrypt_ctx_setopt_query_type(mongocrypt_ctx_t *ctx, const char *query_type, int len);
1579
1416
 
1580
1417
  /**
1581
1418
  * Set options for explicit encryption with the "rangePreview" algorithm.
@@ -1597,9 +1434,7 @@ mongocrypt_ctx_setopt_query_type (mongocrypt_ctx_t *ctx,
1597
1434
  * Retrieve it with @ref mongocrypt_ctx_status
1598
1435
  */
1599
1436
  MONGOCRYPT_EXPORT
1600
- bool
1601
- mongocrypt_ctx_setopt_algorithm_range (mongocrypt_ctx_t *ctx,
1602
- mongocrypt_binary_t *opts);
1437
+ bool mongocrypt_ctx_setopt_algorithm_range(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *opts);
1603
1438
 
1604
1439
  /// String constants for setopt_query_type
1605
1440
  #define MONGOCRYPT_QUERY_TYPE_EQUALITY_STR "equality"