MONGOC_CLIENT...D_KEY_ALT_NAME(3)
π MONGOC_CLIENT...D_KEY_ALT_NAME(3) π
okay bestie so this one lives in libmongoc (that's the C driver for MongoDB, iykyk) and it's literally the glow-up function for your encryption keys β¨
π SYNOPSIS π
bool
mongoc_client_encryption_add_key_alt_name (
mongoc_client_encryption_t *client_encryption,
const bson_value_t *keyid,
const char *keyaltname,
bson_t *key_doc,
bson_error_t *error);
so what this does is it adds keyaltname to the set of alternate names in the key document with UUID keyid. that's it, that's the whole vibe π
πΈ PARAMETERS πΈ
client_encryptionβ amongoc_client_encryption_t. your main character struct, the one running the whole show πkeyidβ a UUID (BSON binary subtype0x04) key ID of the key you're adding the key alternate name to. yes, subtype0x04, memorize it, it's iconic π¦keyaltnameβ the key alternate name to add. the new nickname, the pet name, the ~alias~ πkey_docβ Optional. an uninitializedbson_tset to the value of the key document before addition of the alternate name, or an empty document if the key does not exist. must be freed bybson_destroy(). like, do not forget thebson_destroy(), I'm begging πerrorβ Optional. abson_error_t. where the tea gets spilled if things go wrong π«
β RETURNS β
Returns true if successful. Returns false and sets error otherwise. simple as that, no cap π
SEE ALSO: mongoc_client_encryption_t β go read that one next bestie, it's the whole friend group π«Ά
β¨ AUTHOR β¨
MongoDB, Inc β shoutout to the devs, they ate and left no crumbs π₯
π COPYRIGHT π
2009-present, MongoDB, Inc.
k bye go encrypt something slay π β this has been libmongoc version 2.5.6, dated Oct 09, 2026, mwah π§
π¦ 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