MONGOC_CLIENT...ION_DELETE_KEY(3)

πŸ’… MONGOC_CLIENT...ION_DELETE_KEY(3) πŸ’…

okay so bestie, welcome to the libmongoc manual β€” yes the header said MONGOC_CLIENT...ION_DELETE_KEY(3) and yes it's truncated and no we're not gonna worry about it, it's giving mysterious ✨

This one's all about yeeting a key out of your key vault, and honestly? Iconic behavior. Let's get into it 🫢


✨ SYNOPSIS ✨

bool
mongoc_client_encryption_delete_key (
   mongoc_client_encryption_t *client_encryption,
   const bson_value_t *keyid,
   bson_t *reply,
   bson_error_t *error);

πŸŽ€ DESCRIPTION πŸŽ€

So like β€” this function deletes a key document sitting in the key vault collection, specifically the one that matches the keyid you hand it. That's it. That's the whole vibe. Gone, deleted, no cap πŸ’€


🌸 PARAMETERS 🌸

  • client_encryption β€” a mongoc_client_encryption_t. Your little encryption bestie, the one doing the work πŸ’–
  • keyid β€” the UUID of the key you wanna delete, and heads up, it has to be BSON binary subtype 0x04. Not negotiable, that's the spec πŸ¦‹
  • reply β€” a maybe-NULL pointer to overwritable storage for a bson_t that'll hold the results. Maybe-NULL!! So you can pass NULL, or you can pass somewhere for the results to land. Your call, main character 🌈
  • error β€” optional. It's a bson_error_t. Only swing by if you like knowing what went wrong πŸ™ˆ

πŸ’œ RETURNS πŸ’œ

  • Returns true if it worked. Slay ✨
  • Returns false and sets error otherwise. So like, check your error, bestie, it's literally right there 😭

πŸ‘‘ SEE ALSO πŸ‘‘

  • mongoc_client_encryption_t
  • mongoc_client_encryption_create_datakey()

⭐ AUTHOR ⭐

MongoDB, Inc β€” the ones who made this whole thing happen, periodt πŸ”₯

2009-present, MongoDB, Inc.


ngl, the key insight (pun fully intended, iykyk) is that keyid must be subtype 0x04 β€” get that wrong and it's not gonna go how you want πŸ’…

okay that's the whole page, love u, go delete some keys responsibly 🧚

libmongoc 2.5.6 ⭐ Oct 09, 2026 β€” mwah, that's a wrap, see u in the next manpage πŸ’–πŸŽ€

πŸ“¦ where this page comes from