La classe MongoDB\Driver\ClientEncryption

(mongodb >=1.7.0)

Introduction

La classe MongoDB\Driver\ClientEncryption gère la création de clés de données pour le chiffrement côté client, ainsi que le chiffrement et le déchiffrement manuels des valeurs.

Synopsis de la classe

final class MongoDB\Driver\ClientEncryption {
/* Constantes */
const string AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC = AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic;
const string AEAD_AES_256_CBC_HMAC_SHA_512_RANDOM = AEAD_AES_256_CBC_HMAC_SHA_512-Random;
const string ALGORITHM_INDEXED = Indexed;
const string ALGORITHM_UNINDEXED = Unindexed;
const string ALGORITHM_RANGE = Range;
const string QUERY_TYPE_EQUALITY = equality;
const string QUERY_TYPE_RANGE = range;
/* Méthodes */
final public addKeyAltName(MongoDB\BSON\Binary $keyId, string $keyAltName): ?object
final public __construct(array $options)
final public createDataKey(string $kmsProvider, ?array $options = null): MongoDB\BSON\Binary
final public decrypt(MongoDB\BSON\Binary $value): mixed
final public deleteKey(MongoDB\BSON\Binary $keyId): object
final public encrypt(mixed $value, ?array $options = null): MongoDB\BSON\Binary
final public encryptExpression(array|object $expr, ?array $options = null): object
final public getKey(MongoDB\BSON\Binary $keyId): ?object
final public getKeyByAltName(string $keyAltName): ?object
final public removeKeyAltName(MongoDB\BSON\Binary $keyId, string $keyAltName): ?object
final public rewrapManyDataKey(array|object $filter, ?array $options = null): object
}

Constantes pré-définies

MongoDB\Driver\ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC

Spécifie un algorithme pour » le chiffrement déterministe, qui est adapté aux requêtes.

MongoDB\Driver\ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_RANDOM

Spécifie un algorithme pour » le chiffrement aléatoire.

MongoDB\Driver\ClientEncryption::ALGORITHM_INDEXED

Spécifie un algorithme pour une charge utile indexée et chiffrée, qui peut être utilisée avec le chiffrement de requêtes.

Pour insérer ou interroger avec une charge utile indexée et chiffrée, le MongoDB\Driver\Manager doit être configuré avec l'option de pilote "autoEncryption". L'option de chiffrement automatique "bypassQueryAnalysis" peut être true. L'option de chiffrement automatique "bypassAutoEncryption" doit être false.

MongoDB\Driver\ClientEncryption::ALGORITHM_UNINDEXED

Spécifie un algorithme pour une charge utile non indexée et chiffrée.

MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE

Spécifie un algorithme pour une charge utile chiffrée par plage, qui peut être utilisée avec le chiffrement de requêtes.

Pour interroger avec une charge utile chiffrée par plage, le MongoDB\Driver\Manager doit être configuré avec l'option de pilote "autoEncryption". L'option de chiffrement automatique "bypassQueryAnalysis" peut être true. L'option de chiffrement automatique "bypassAutoEncryption" doit être false.

Note:

L'extension ne prend pas encore en charge les requêtes de plage pour les types de champ BSON Decimal128.

MongoDB\Driver\ClientEncryption::QUERY_TYPE_EQUALITY

Spécifie un type de requête d'égalité, qui est utilisé en conjonction avec MongoDB\Driver\ClientEncryption::ALGORITHM_INDEXED.

MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE

Spécifie un type de requête de plage, qui est utilisé en conjonction avec MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE.

Historique

Version Description
PECL mongodb 2.0.0

Supprimer MongoDB\Driver\ClientEncryption::ALGORITHM_INDEXED et Removed MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE_PREVIEW and MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE_PREVIEW.

PECL mongodb 1.20.0

Ajout MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE et MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE.

Déprécié MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE_PREVIEW et MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE_PREVIEW.

PECL mongodb 1.16.0 Ajout MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE_PREVIEW et MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE_PREVIEW.
PECL mongodb 1.14.0 Ajout MongoDB\Driver\ClientEncryption::ALGORITHM_INDEXED, MongoDB\Driver\ClientEncryption::ALGORITHM_UNINDEXED, et MongoDB\Driver\ClientEncryption::QUERY_TYPE_EQUALITY.

Sommaire

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top