OpenQuizz
Une application de gestion des contenus pédagogiques
_Encrypter Class Reference
Inheritance diagram for _Encrypter:
Collaboration diagram for _Encrypter:

Public Member Functions

def __init__ (self, io_callbacks, opts)
 
def encrypt (self, database, cmd, check_keys, codec_options)
 
def decrypt (self, response)
 
def close (self)
 

Static Public Member Functions

def create (client, opts)
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  io_callbacks,
  opts 
)
Encrypts and decrypts MongoDB commands.

This class is used to support automatic encryption and decryption of
MongoDB commands.

:Parameters:
  - `io_callbacks`: A :class:`MongoCryptCallback`.
  - `opts`: The encrypted client's :class:`AutoEncryptionOpts`.

Member Function Documentation

◆ close()

def close (   self)
Cleanup resources.

◆ create()

def create (   client,
  opts 
)
static
Create a _CommandEncyptor for a client.

:Parameters:
  - `client`: The encrypted MongoClient.
  - `opts`: The encrypted client's :class:`AutoEncryptionOpts`.

:Returns:
  A :class:`_CommandEncrypter` for this client.

◆ decrypt()

def decrypt (   self,
  response 
)
Decrypt a MongoDB command response.

:Parameters:
  - `response`: A MongoDB command response as BSON.

:Returns:
  The decrypted command response.

◆ encrypt()

def encrypt (   self,
  database,
  cmd,
  check_keys,
  codec_options 
)
Encrypt a MongoDB command.

:Parameters:
  - `database`: The database for this command.
  - `cmd`: A command document.
  - `check_keys`: If True, check `cmd` for invalid keys.
  - `codec_options`: The CodecOptions to use while encoding `cmd`.

:Returns:
  The encrypted command to execute.

The documentation for this class was generated from the following file: