Table of Contents

Class ClientEncryption

Namespace
MongoDB.Driver.Encryption
Assembly
MongoDB.Driver.dll

Explicit client encryption.

public sealed class ClientEncryption : IDisposable
Inheritance
ClientEncryption
Implements
Inherited Members

Constructors

ClientEncryption(ClientEncryptionOptions)

Initializes a new instance of the ClientEncryption class.

Methods

AddAlternateKeyName(Guid, string, CancellationToken)

Adds an alternate key name to the keyAltNames array of the key document in the key vault collection with the given UUID (BSON binary subtype 0x04).

AddAlternateKeyNameAsync(Guid, string, CancellationToken)

Adds an alternate key name to the keyAltNames array of the key document in the key vault collection with the given UUID (BSON binary subtype 0x04).

CreateDataKey(string, DataKeyOptions, CancellationToken)

An alias function equivalent to createKey.

CreateDataKeyAsync(string, DataKeyOptions, CancellationToken)

An alias function equivalent to createKey.

CreateEncryptedCollection(IMongoDatabase, string, CreateCollectionOptions, string, BsonDocument, CancellationToken)

Create encrypted collection.

CreateEncryptedCollection(IMongoDatabase, string, CreateCollectionOptions, string, DataKeyOptions, CancellationToken)

Create encrypted collection.

CreateEncryptedCollectionAsync(IMongoDatabase, string, CreateCollectionOptions, string, BsonDocument, CancellationToken)

Create encrypted collection.

CreateEncryptedCollectionAsync(IMongoDatabase, string, CreateCollectionOptions, string, DataKeyOptions, CancellationToken)

Create encrypted collection.

Decrypt(BsonBinaryData, CancellationToken)

Decrypts the specified value.

DecryptAsync(BsonBinaryData, CancellationToken)

Decrypts the specified value.

DeleteKey(Guid, CancellationToken)

Removes the key document with the given UUID (BSON binary subtype 0x04) from the key vault collection.

DeleteKeyAsync(Guid, CancellationToken)

Removes the key document with the given UUID (BSON binary subtype 0x04) from the key vault collection.

Dispose()
Encrypt(BsonValue, EncryptOptions, CancellationToken)

Encrypts the specified value.

EncryptAsync(BsonValue, EncryptOptions, CancellationToken)

Encrypts the specified value.

EncryptExpression(BsonDocument, EncryptOptions, CancellationToken)

Encrypts a Match Expression or Aggregate Expression to query a range index.

EncryptExpressionAsync(BsonDocument, EncryptOptions, CancellationToken)

Encrypts a Match Expression or Aggregate Expression to query a range index.

GetKey(Guid, CancellationToken)

Finds a single key document with the given UUID (BSON binary subtype 0x04).

GetKeyAsync(Guid, CancellationToken)

Finds a single key document with the given UUID (BSON binary subtype 0x04).

GetKeyByAlternateKeyName(string, CancellationToken)

Finds a single key document with the given alter name.

GetKeyByAlternateKeyNameAsync(string, CancellationToken)

Finds a single key document with the given UUID (BSON binary subtype 0x04).

GetKeys(CancellationToken)

Finds all documents in the key vault collection.

GetKeysAsync(CancellationToken)

Finds all documents in the key vault collection.

RemoveAlternateKeyName(Guid, string, CancellationToken)

Removes an alternateKeyName from the keyAltNames array of the key document in the key vault collection with the given UUID (BSON binary subtype 0x04).

RemoveAlternateKeyNameAsync(Guid, string, CancellationToken)

Removes an alternateKeyName from the keyAltNames array of the key document in the key vault collection with the given UUID (BSON binary subtype 0x04).

RewrapManyDataKey(FilterDefinition<BsonDocument>, RewrapManyDataKeyOptions, CancellationToken)

Decrypts multiple data keys and (re-)encrypts them with a new masterKey, or with their current masterKey if a new one is not given.

RewrapManyDataKeyAsync(FilterDefinition<BsonDocument>, RewrapManyDataKeyOptions, CancellationToken)

Decrypts multiple data keys and (re-)encrypts them with a new masterKey, or with their current masterKey if a new one is not given.