Get a data key by id. :param id` (Binary): The UUID of a key a which must be a :class:`~bson.binary.Binary` with subtype 4 ( :attr:`~bson.binary.UUID_SUBTYPE`). :return: The key document. .. versionadded:: 4.2
(self, id: Binary)
| 1086 | return decode(decrypted_doc, codec_options=self._codec_options)["v"] |
| 1087 | |
| 1088 | def get_key(self, id: Binary) -> Optional[RawBSONDocument]: |
| 1089 | """Get a data key by id. |
| 1090 | |
| 1091 | :param id` (Binary): The UUID of a key a which must be a |
| 1092 | :class:`~bson.binary.Binary` with subtype 4 ( |
| 1093 | :attr:`~bson.binary.UUID_SUBTYPE`). |
| 1094 | |
| 1095 | :return: The key document. |
| 1096 | |
| 1097 | .. versionadded:: 4.2 |
| 1098 | """ |
| 1099 | self._check_closed() |
| 1100 | assert self._key_vault_coll is not None |
| 1101 | return self._key_vault_coll.find_one({"_id": id}) |
| 1102 | |
| 1103 | def get_keys(self) -> Cursor[RawBSONDocument]: |
| 1104 | """Get all of the data keys. |
nothing calls this directly
no test coverage detected