Table of Contents

Class EncryptOptions

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

Encryption options for explicit encryption.

public class EncryptOptions
Inheritance
EncryptOptions
Inherited Members

Constructors

EncryptOptions(EncryptionAlgorithm, Optional<string>, Optional<Guid?>, Optional<long?>, Optional<string>, Optional<RangeOptions>)

Initializes a new instance of the EncryptOptions class.

public EncryptOptions(EncryptionAlgorithm algorithm, Optional<string> alternateKeyName = default, Optional<Guid?> keyId = default, Optional<long?> contentionFactor = default, Optional<string> queryType = default, Optional<RangeOptions> rangeOptions = default)

Parameters

algorithm EncryptionAlgorithm

The encryption algorithm.

alternateKeyName Optional<string>

The alternate key name.

keyId Optional<Guid?>

The key Id.

contentionFactor Optional<long?>

The contention factor.

queryType Optional<string>

The query type.

rangeOptions Optional<RangeOptions>

The range options.

EncryptOptions(string, Optional<string>, Optional<Guid?>, Optional<long?>, Optional<string>, Optional<RangeOptions>)

Initializes a new instance of the EncryptOptions class.

public EncryptOptions(string algorithm, Optional<string> alternateKeyName = default, Optional<Guid?> keyId = default, Optional<long?> contentionFactor = default, Optional<string> queryType = default, Optional<RangeOptions> rangeOptions = default)

Parameters

algorithm string

The encryption algorithm.

alternateKeyName Optional<string>

The alternate key name.

keyId Optional<Guid?>

The key Id.

contentionFactor Optional<long?>

The contention factor.

queryType Optional<string>

The query type.

rangeOptions Optional<RangeOptions>

The range options.

Properties

Algorithm

Gets the algorithm.

public string Algorithm { get; }

Property Value

string

The algorithm.

AlternateKeyName

Gets the alternate key name.

public string AlternateKeyName { get; }

Property Value

string

The alternate key name.

ContentionFactor

Gets the contention factor.

public long? ContentionFactor { get; }

Property Value

long?

The contention factor.

KeyId

Gets the key identifier.

public Guid? KeyId { get; }

Property Value

Guid?

The key identifier.

QueryType

Gets the query type.

public string QueryType { get; }

Property Value

string

The query type.

RangeOptions

Gets the range options.

public RangeOptions RangeOptions { get; }

Property Value

RangeOptions

The range options.

Remarks

The Range algorithm is experimental only. It is not intended for public use. RangeOpts specifies index options for a Queryable Encryption field supporting "rangePreview" queries. RangeOptions only applies when algorithm is "rangePreview".

Methods

With(Optional<string>, Optional<string>, Optional<Guid?>, Optional<long?>, Optional<string>, Optional<RangeOptions>)

Returns a new EncryptOptions instance with some settings changed.

public EncryptOptions With(Optional<string> algorithm = default, Optional<string> alternateKeyName = default, Optional<Guid?> keyId = default, Optional<long?> contentionFactor = default, Optional<string> queryType = default, Optional<RangeOptions> rangeOptions = default)

Parameters

algorithm Optional<string>

The encryption algorithm.

alternateKeyName Optional<string>

The alternate key name.

keyId Optional<Guid?>

The keyId.

contentionFactor Optional<long?>

The contention factor.

queryType Optional<string>

The query type.

rangeOptions Optional<RangeOptions>

The range options.

Returns

EncryptOptions

A new EncryptOptions instance.