Table of Contents

Class EncryptionKeyWrapMetadata

Namespace
Microsoft.Azure.Cosmos
Assembly
Microsoft.Azure.Cosmos.Client.dll

Metadata that can be used to wrap/unwrap a Data Encryption Key using a Customer Managed Key. See https://aka.ms/CosmosClientEncryption for more information on client-side encryption support in Azure Cosmos DB.

public class EncryptionKeyWrapMetadata : IEquatable<EncryptionKeyWrapMetadata>
Inheritance
EncryptionKeyWrapMetadata
Implements
Inherited Members
Extension Methods

Constructors

EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata)

Creates a new instance of key wrap metadata based on an existing instance.

public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source)

Parameters

source EncryptionKeyWrapMetadata

Existing instance from which to initialize.

EncryptionKeyWrapMetadata(string, string, string, string)

Creates a new instance of key wrap metadata.

public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm)

Parameters

type string

Identifier for the key resolver.

name string

Identifier for the customer managed key.

value string

Path to the customer managed key.

algorithm string

Algorithm used in wrapping and unwrapping of the data encryption key.

Properties

Algorithm

Serialized form of metadata. Note: This value is saved in the Cosmos DB service. Implementors of derived implementations should ensure that this does not have (private) key material or credential information.

public string Algorithm { get; }

Property Value

string

Name

Serialized form of metadata. Note: This value is saved in the Cosmos DB service. Implementors of derived implementations should ensure that this does not have (private) key material or credential information.

public string Name { get; }

Property Value

string

Type

Serialized form of metadata. Note: This value is saved in the Cosmos DB service. Implementors of derived implementations should ensure that this does not have (private) key material or credential information.

public string Type { get; }

Property Value

string

Value

Serialized form of metadata. Note: This value is saved in the Cosmos DB service. Implementors of derived implementations should ensure that this does not have (private) key material or credential information.

public string Value { get; }

Property Value

string

Methods

Equals(EncryptionKeyWrapMetadata)

Returns whether the properties of the passed in key wrap metadata matches with those in the current instance.

public bool Equals(EncryptionKeyWrapMetadata other)

Parameters

other EncryptionKeyWrapMetadata

Key wrap metadata to be compared with current instance.

Returns

bool

True if the properties of the key wrap metadata passed in matches with those in the current instance, else false.

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int