MONGOC_CLIENT...OPTS_SET_KEYID(3)
π MONGOC_CLIENT...OPTS_SET_KEYID(3) π
okay bestie, so this one lives in libmongoc (that's the C driver for MongoDB, iykyk) and it's lowkey a tiny little function with one very specific job. she sets the key id. that's it. that's the whole vibe. and she does it flawlessly. β¨
β¨ SYNOPSIS β¨
void
mongoc_client_encryption_encrypt_opts_set_keyid (
mongoc_client_encryption_encrypt_opts_t *opts, const bson_value_t *keyid);
so what does she actually do? she identifies the data key to use for encryption. literally her whole personality. π«Ά
β οΈ important bestie note: this option is mutually exclusive with mongoc_client_encryption_encrypt_opts_set_keyaltname(). like, pick one. you cannot have both. it's giving "choose your fighter" and honestly that's fine. π
π PARAMETERS π
optsβ amongoc_client_encryption_encrypt_opts_t. yes that's the whole type name, no we're not abbreviating it, she's iconic and she's long. πkeyidβ the UUID (BSON binary subtype0x04) corresponding to the_idof the data key. so like, the actual identifier of which key you're using. no guessing, no vibes-based key selection, just the real UUID. πΈ
π SEE ALSO
mongoc_client_encryption_encrypt_opts_set_keyaltname()β the other half of the mutually-exclusive duo. go say hi. π¦
π AUTHOR
MongoDB, Inc β the whole entire company. credit where credit is due, periodt. π
π COPYRIGHT
2009-present, MongoDB, Inc. β that's a long run bestie, we love longevity. β
and that's the page!! mwah π fr fr, stay encrypted, stay slay.
π§ cute little sign-off: this was libmongoc 2.5.6, dated Oct 09, 2026 β go forth and set those key ids, bestie π
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms