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 function addKeyAltName(MongoDB\BSON\Binary $keyId, string $keyAltName): ?object
final public function __construct(array $options)
final public function createDataKey(string $kmsProvider, ?array $options = null): MongoDB\BSON\Binary
final public function decrypt(MongoDB\BSON\Binary $value): mixed
final public function deleteKey(MongoDB\BSON\Binary $keyId): object
final public function encrypt(mixed $value, ?array $options = null): MongoDB\BSON\Binary
final public function encryptExpression(array|object $expr, ?array $options = null): object
final public function getKey(MongoDB\BSON\Binary $keyId): ?object
final public function getKeyByAltName(string $keyAltName): ?object
final public function getKeys(): MongoDB\Driver\Cursor
final public function removeKeyAltName(MongoDB\BSON\Binary $keyId, string $keyAltName): ?object
final public function 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 Suppression de MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE_PREVIEW et 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.