|
def | __init__ (self, io_callbacks, opts) |
|
def | encrypt (self, database, cmd, check_keys, codec_options) |
|
def | decrypt (self, response) |
|
def | close (self) |
|
◆ __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`.
◆ close()
◆ 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:
- /home/passerat/Stage/flaskProject/venv/lib/python3.8/site-packages/pymongo/encryption.py