- Reference >
- MongoDB\Client Class >
- MongoDB\Client::createClientEncryption()
MongoDB\Client::createClientEncryption()
On this page
Definition
-
MongoDB\Client::createClientEncryption
Returns a MongoDB\Driver\ClientEncryption object for manual encryption and decryption of values.
This method has the following parameters:
Parameter Type Description $options
array Optional. An array specifying the desired options. The
$options
parameter supports all options documented in the extension manual. For thekeyVaultClient
option, an instance ofMongoDB\Client
is automatically unwrapped and the MongoDB\Driver\Manager instance is passed to the extension.
Return Values
A MongoDB\Driver\ClientEncryption instance 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\InvalidArgumentException for errors related to the parsing of parameters or options at the driver level.