Table of Contents

Method EncryptAsync

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

EncryptAsync(BsonValue, EncryptOptions, CancellationToken)

Encrypts the specified value.

public Task<BsonBinaryData> EncryptAsync(BsonValue value, EncryptOptions encryptOptions, CancellationToken cancellationToken = default)

Parameters

value BsonValue

The value.

encryptOptions EncryptOptions

The encrypt options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<BsonBinaryData>

The encrypted value.