ClientEncryption
final class ClientEncryption (View source)
The MongoDB\Driver\ClientEncryption class handles creation of data keys for client-side encryption, as well as manually encrypting and decrypting values.
Constants
AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC |
|
AEAD_AES_256_CBC_HMAC_SHA_512_RANDOM |
|
ALGORITHM_INDEXED
Since: 1.14.0
|
|
ALGORITHM_UNINDEXED
Since: 1.14.0
|
|
ALGORITHM_RANGE
Since: 1.20.0
|
|
deprecated ALGORITHM_RANGE_PREVIEW
Since: 1.16.0
|
|
QUERY_TYPE_EQUALITY
Since: 1.14.0
|
|
QUERY_TYPE_RANGE
Since: 1.20.0
|
|
deprecated QUERY_TYPE_RANGE_PREVIEW
Since: 1.16.0
|
|
Methods
No description
No description
Creates a new key document and inserts into the key vault collection.
Encrypts a value with a given key and algorithm.
Encrypts a Match Expression or Aggregate Expression to query a range index
Gets a key document by an alternate name
Rewraps data keys
Details
final
__construct(array $options)
No description
final
__wakeup()
No description
final object|null
addKeyAltName(Binary $keyId, string $keyAltName)
Adds an alternate name to a key document
final Binary
createDataKey(string $kmsProvider, array|null $options = null)
Creates a new key document and inserts into the key vault collection.
final mixed
decrypt(Binary $keyVaultClient)
Decrypts an encrypted value (BSON binary of subtype 6).
final object
deleteKey(Binary $keyId)
Deletes a key document
final Binary
encrypt(mixed $value, array|null $options = null)
Encrypts a value with a given key and algorithm.
final object
encryptExpression(array|object $expr, array|null $options = null)
Encrypts a Match Expression or Aggregate Expression to query a range index
final object|null
getKey(Binary $keyId)
Gets a key document
final object|null
getKeyByAltName(string $keyAltName)
Gets a key document by an alternate name
final Cursor
getKeys()
Finds all key documents in the key vault collection.
final object|null
removeKeyAltName(Binary $keyId, string $keyAltName)
Removes an alternate name from a key document
final object
rewrapManyDataKey(array|object $filter, array|null $options = null)
Rewraps data keys