Click or drag to resize

ClientEncryption.EncryptAsync Method

Encrypts the specified value.

Namespace:  MongoDB.Driver.Encryption
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax
public Task<BsonBinaryData> EncryptAsync(
	BsonValue value,
	EncryptOptions encryptOptions,
	CancellationToken cancellationToken = null
)

Parameters

value
Type: MongoDB.Bson.BsonValue
The value.
encryptOptions
Type: MongoDB.Driver.Encryption.EncryptOptions
The encrypt options.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task<BsonBinaryData>
The encrypted value.
See Also