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
BsonValueThe value.
encryptOptions
EncryptOptionsThe encrypt options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<BsonBinaryData>
The encrypted value.