Share via


CocktailContentKey Class

Definition

Represents the key used to encrypt the PlayReady content with the cocktail algorithm. The cocktail algorithm is the symmetric key algorithm used to encrypt content in the legacy Windows Media DRM ecosystem.

public class CocktailContentKey : Microsoft.Media.Drm.ContentKey
type CocktailContentKey = class
    inherit ContentKey
Public Class CocktailContentKey
Inherits ContentKey
Inheritance
CocktailContentKey

Remarks

Any service that plans to support legacy WMDRM content in their PlayReady ecosystem needs to use this class to deliver licenses so that the clients can successfully playback legacy content on their machines.

All content keys have a key identifier put into the header of the content that identifies which key was used to encrypt that content. The key identifier can also be used with a key seed value to generate the content key. This method of key generation means that the service does not have to store a large database of content keys. However, content keys can be generated using any cryptographically sound method.

Constructors

CocktailContentKey(Byte[], String)

Initializes a new instance of the CocktailContentKey class. The content key is specified by the caller.

CocktailContentKey(String, String)

Initializes a new instance of the CocktailContentKey class. The content key is auto-generated by the SDK using a key seed.

Properties

EncryptionType

Gets the ContentKeyType of the content key.

(Inherited from ContentKey)
KeyId

Gets the key identifier of the content key.

(Inherited from ContentKey)
KeyIdAsString

Gets the string representation of the key identifier of the content key.

(Inherited from ContentKey)
KeyType

Gets the ContentKeyType of the content key.

Methods

GetKeyData()

Gets the binary key data of the content key.

(Inherited from ContentKey)
GetKeyIdAsString()

Returns the string representation of the key identifier of the content key. Returns the same value as KeyIdAsString

(Inherited from ContentKey)
NormalizeKid(String)

Converts a base64 representation of Key Identifer to a Guid. If Key Identifier data size is not equal to 16 bytes, it creates an alternate Guid represenation which is 16 bytes.

Applies to