Table of Contents

Method EncryptFieldsAsync

Namespace
MongoDB.Driver.Core.WireProtocol
Assembly
MongoDB.Driver.dll

EncryptFieldsAsync(string, byte[], CancellationToken)

Encrypts the fields asynchronously.

Task<byte[]> EncryptFieldsAsync(string databaseName, byte[] unencryptedCommandBytes, CancellationToken cancellationToken)

Parameters

databaseName string

The database name.

unencryptedCommandBytes byte[]

The unencrypted command bytes.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<byte[]>

An encrypted document.