Table of Contents

Method CreateDataKeyAsync

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

CreateDataKeyAsync(string, DataKeyOptions, CancellationToken)

An alias function equivalent to createKey.

public Task<Guid> CreateDataKeyAsync(string kmsProvider, DataKeyOptions dataKeyOptions, CancellationToken cancellationToken = default)

Parameters

kmsProvider string

The kms provider.

dataKeyOptions DataKeyOptions

The data key options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<Guid>

A data key.