Table of Contents

Interface IBinaryCommandFieldEncryptor

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

Interface for decrypting fields in a binary document.

public interface IBinaryCommandFieldEncryptor

Methods

EncryptFields(string, byte[], CancellationToken)

Encrypts the fields.

byte[] EncryptFields(string databaseName, byte[] unencryptedCommandBytes, CancellationToken cancellationToken)

Parameters

databaseName string

The database name.

unencryptedCommandBytes byte[]

The unencrypted command bytes.

cancellationToken CancellationToken

The cancellation token.

Returns

byte[]

An encrypted document.

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.