Chilkat VB.NET OmaDrm Class Reference

OmaDrm

Chilkat OMA DRM is a software component providing the ability to read and write Open Mobile Alliance (OMA) Digital Rights Management (DRM) content format files. Specifically, the Chilkat OMA DRM SDK (or toolkit) can parse and/or create DRM Content Format v1.0 files (i.e. encrypted media object files with the .dcf file extension.) The Chilkat OMA DRM library is included as part of the Chilkat Crypt toolkit license.

Properties

Base64Key As String

The 16-byte secret key for encryption/decryption in Base64 encoded form.

ContentType As String

The MIME media type of the DRM protected content.

ContentUri As String

The unique URI for the DRM protected content.

DecryptedData As Byte() (ReadOnly)

Decrypts and returns the DRM protected content. The secret key must be set correctly beforehand. The the secret key is incorrect, gibberish is returned.

DrmContentVersion As Integer (ReadOnly)

The version of the DRM content format specification used to produce this content object.

EncryptedData As Byte() (ReadOnly)

This property provides access to the encrypted data contained within the DRM content.

Headers As String

Header fields separated by CRLF line endings containing additional meta data about the DRM content.

IV As Byte()

The initialization vector to be used when encrypting the DRM protected content.

LastErrorHtml As String (ReadOnly)

Error information in HTML format for the last method called.

LastErrorText As String (ReadOnly)

Error information in plain-text format for the last method called.

LastErrorXml As String (ReadOnly)

Error information in XML format for the last method called.

Methods

Function CreateDcfFile(ByVal filename As String) As Boolean

Writes a .dcf file using the property settings and data contained within the calling object.

Function GetHeaderField(ByVal fieldName As String) As String

Returns a header field value by field name.

Returns Nothing on failure

Function LoadDcfData(ByVal data As Byte()) As Boolean

Loads a .dcf file from in-memory data.

Function LoadDcfFile(ByVal filename As String) As Boolean

Loads a .dcf file into the calling object. Once loaded, the headers and data can be accessed via the OMA DRM object's properties and methods.

Sub LoadUnencryptedData(ByVal data As Byte())

Loads data into the OMA DRM object. This is the data that will be written to the .dcf file when the CreateDcfFile method is called

Function LoadUnencryptedFile(ByVal filename As String) As Boolean

Loads file data into the OMA DRM object. This is the data that will be written to the .dcf file when the CreateDcfFile method is called

Function SaveDecrypted(ByVal filename As String) As Boolean

Decrypts the data contained within the OMA DRM object and saves the result to an output file.

Function SaveLastError(ByVal filename As String) As Boolean

Saves the last error information to an XML formatted file.

Sub SetEncodedIV(ByVal encodedIv As String, ByVal encoding As String)

Sets the initialization vector via an encoded string. The encoding may be "base64", "hex", "url", or "quoted-printable".

Function UnlockComponent(ByVal b1 As String) As Boolean

Unlocks the OMA DRM component at runtime. This must be called once at the beginning of your application. Passing an arbitrary value initiates a fully-functional 30-day trial. A permanent unlock code is required to use the component beyond 30 days. Because the OMA DRM component is included with the Chilkat Crypt license, any valid Chilkat Crypt unlock code will also unlock this component.