Class DataKeyOptions
- Namespace
- MongoDB.Driver.Encryption
- Assembly
- MongoDB.Driver.dll
Options for creating a data key.
public class DataKeyOptions
- Inheritance
-
DataKeyOptions
- Inherited Members
Constructors
DataKeyOptions(Optional<IReadOnlyList<string>>, Optional<BsonDocument>, Optional<BsonBinaryData>)
Initializes a new instance of the DataKeyOptions class.
public DataKeyOptions(Optional<IReadOnlyList<string>> alternateKeyNames = default, Optional<BsonDocument> masterKey = default, Optional<BsonBinaryData> keyMaterial = default)
Parameters
alternateKeyNames
Optional<IReadOnlyList<string>>The alternate key names.
masterKey
Optional<BsonDocument>The master key.
keyMaterial
Optional<BsonBinaryData>The key material.
Properties
AlternateKeyNames
Gets the alternate key names.
public IReadOnlyList<string> AlternateKeyNames { get; }
Property Value
- IReadOnlyList<string>
The alternate key names.
KeyMaterial
Gets the key material.
public BsonBinaryData KeyMaterial { get; }
Property Value
- BsonBinaryData
The key material.
MasterKey
Gets the master key.
public BsonDocument MasterKey { get; }
Property Value
- BsonDocument
The master key.
Methods
With(Optional<IReadOnlyList<string>>, Optional<BsonDocument>, Optional<BsonBinaryData>)
Returns a new DataKeyOptions instance with some settings changed.
public DataKeyOptions With(Optional<IReadOnlyList<string>> alternateKeyNames = default, Optional<BsonDocument> masterKey = default, Optional<BsonBinaryData> keyMaterial = default)
Parameters
alternateKeyNames
Optional<IReadOnlyList<string>>The alternate key names.
masterKey
Optional<BsonDocument>The master key.
keyMaterial
Optional<BsonBinaryData>The key material.
Returns
- DataKeyOptions
A new DataKeyOptions instance.