php8.5
Home/ Manual/ driver / manager/ MongoDB\Driver\Manager::createClientEncryption

MongoDB\Driver\Manager::createClientEncryption

PHP function Edit on GitHub ✎

(mongodb >=1.7.0)

Create a new ClientEncryption object

Description

MongoDB\Driver\Manager::createClientEncryption(array $options): MongoDB\Driver\ClientEncryption

Constructs a new MongoDB\Driver\ClientEncryption object with the specified options.

Parameters

options
OptionTypeDescription

Return Values

Returns a new MongoDB\Driver\ClientEncryption instance.

Errors/Exceptions

  • Throws MongoDB\Driver\Exception\RuntimeException if the extension was compiled without libmongocrypt support

Changelog

VersionDescription
PECL mongodb 1.16.0The AWS KMS provider for client-side encryption now accepts a "sessionToken" option, which can be used to authenticate with temporary AWS credentials.Added "tlsDisableOCSPEndpointCheck" to the "tlsOptions" option.If an empty document is specified for the "azure" or "gcp" KMS provider, the driver will attempt to configure the provider using Automatic Credentials.
PECL mongodb 1.15.0If an empty document is specified for the "aws" KMS provider, the driver will attempt to configure the provider using Automatic Credentials.
PECL mongodb 1.12.0KMIP is now supported as a KMS provider for client-side encryption and may be configured in the "kmsProviders" option.Added the "tlsOptions" option.
PECL mongodb 1.10.0Azure and GCP are now supported as KMS providers for client-side encryption and may be configured in the "kmsProviders" option. Base64-encoded strings are now accepted as an alternative to MongoDB\BSON\Binary for options within "kmsProviders".

See Also

Source: reference/mongodb/mongodb/driver/manager/createclientencryption.xml · from the official PHP manual (php/doc-en)