MongoDB\Client::createClientEncryption()
Definition
MongoDB\Client::createClientEncryption()
Returns a
MongoDB\Driver\ClientEncryptionobject for manual encryption and decryption of values.function createClientEncryption(array $options): MongoDB\Driver\ClientEncryption
Parameters
$options
: arrayAn array specifying the desired options. Refer to the MongoDB\Driver\Manager::createClientEncryption()extension documentation for a list of supported options.
If a
MongoDB\Client
is provided for thekeyVaultClient
option, it will be unwrapped into a MongoDB\Driver\Managerfor the extension.
Return Values
A MongoDB\Driver\ClientEncryptioninstance which can be used to encrypt and decrypt values.
Errors/Exceptions
MongoDB\Exception\InvalidArgumentException
for errors related to the parsing of parameters or options.
MongoDB\Driver\Exception\InvalidArgumentExceptionfor errors related to the parsing of parameters or options at the extension level.