MONGOC_CLIENT_ENCRYPTION_T(3)

πŸ’… MONGOC_CLIENT_ENCRYPTION_T(3) πŸ’…

okay bestie, welcome to the libmongoc page for MONGOC_CLIENT_ENCRYPTION_T(3) β€” yes that's the manual name, yes it's a mouthful, no we're not shortening it, it's iconic ✨


✨ SYNOPSIS ✨

typedef struct _mongoc_client_encryption_t mongoc_client_encryption_t;

so like, mongoc_client_encryption_t is the little struct that hands you utility functions for In-Use Encryption πŸŽ€ that's the whole vibe.


🧡 THREAD SAFETY 🧡

listen up because this part matters fr fr: mongoc_client_encryption_t is NOT thread-safe 😭 and it should only be used in the same thread as the mongoc_client_t that's configured via mongoc_client_encryption_opts_set_keyvault_client(). no cap. don't be out here sharing it across threads, it will not slay πŸ’€


🌸 LIFECYCLE 🌸

the key vault client β€” the one you configure via mongoc_client_encryption_opts_set_keyvault_client() β€” must outlive the mongoc_client_encryption_t. like, it's the main character and your encryption object is the sidekick, okay? sidekicks go first 🫢

πŸ‘€ SEE ALSO πŸ‘€

  • mongoc_client_enable_auto_encryption()
  • mongoc_client_pool_enable_auto_encryption()
  • In-Use Encryption for libmongoc
  • The MongoDB Manual for Client-Side Field Level Encryption
  • The MongoDB Manual for Queryable Encryption

go read those, they're giving required reading πŸ’œ


πŸ’– AUTHOR πŸ’–

MongoDB, Inc β€” the whole team, not just one guy, we love a collective πŸ‘‘


2009-present, MongoDB, Inc. that's the copyright line, keep it sacred 🌈


and that's the page!! mwah πŸ’‹ this was brought to you by libmongoc version 2.5.6, dated Oct 09, 2026 β€” periodt, see you in the next manpage bestie πŸ¦‹πŸ’…

πŸ“¦ where this page comes from