Windows Media Rights Manager SDK banner art

Specifying a License Chain When Protecting Content

When you protect content, you specify the elements of its license chain by adding an uplink ID, which is the key ID of the root license. The content owner must work with the license issuer to determine the structure of the license chain and the values of the uplink IDs.

Example Code

Dim KeyObj                   ' WMRMKeys object
Dim RootKID                  ' Key ID of the root license
Dim LeafKID                  ' Key ID of the leaf license
Dim LKSeed                   ' License key seed
Dim ContentKey               ' Key of the leaf license

'Generate root and leaf key IDs.
Set KeyObj = Server.CreateObject("WMRMObjs.WMRMKeys")

RootKID = KeyObj.GenerateKeyID()
LeafKID = KeyObj.GenerateKeyID()

' Generate the content key for the leaf license.  
KeyObj.Seed = LKSeed
KeyObj.KeyID = LeafKID
ContentKey = KeyObj.GenerateKey()

'Set values into the content header and sign it.
Set HeaderObj = Server.CreateObject("WMRMObjs.WMRMHeader")
HeaderObj.KeyID = LeafKID
HeaderObj.LicenseAcqURL = LicURL

' Add the root key ID to the license to indicate a chain.
HeaderObj.AddUplink(RootKid)

' Continue protecting the content.

See Also