Пример #1
0
 def finish(self):
     """Returns the finished mongo operation as bson bytes."""
     with MongoCryptBinaryOut() as binary:
         if not lib.mongocrypt_ctx_finalize(self.__ctx, binary.bin):
             self._raise_from_status()
         return binary.to_bytes()
Пример #2
0
 def message(self):
     """The HTTP request message to send to the given endpoint."""
     with MongoCryptBinaryOut() as binary:
         if not lib.mongocrypt_kms_ctx_message(self.__ctx, binary.bin):
             self.__raise_from_status()
         return binary.to_bytes()
Пример #3
0
 def mongo_operation(self):
     """Returns the mongo operation to execute as bson bytes."""
     with MongoCryptBinaryOut() as binary:
         if not lib.mongocrypt_ctx_mongo_op(self.__ctx, binary.bin):
             self._raise_from_status()
         return binary.to_bytes()