Chilkat C# 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
public string Base64Key {get; set; }
The 16-byte secret key for encryption/decryption in Base64 encoded form.
public string ContentType {get; set; }
The MIME media type of the DRM protected content.
public string ContentUri {get; set; }
The unique URI for the DRM protected content.
public byte[] DecryptedData {get; }
Decrypts and returns the DRM protected content. The secret key must be set correctly beforehand. The the secret key is incorrect, gibberish is returned.
public int DrmContentVersion {get; }
The version of the DRM content format specification used to produce this content object.
public byte[] EncryptedData {get; }
This property provides access to the encrypted data contained within the DRM content.
public string Headers {get; set; }
Header fields separated by CRLF line endings containing additional meta data about the DRM content.
public byte[] IV {get; set; }
The initialization vector to be used when encrypting the DRM protected content.
public string LastErrorHtml {get; }
Error information in HTML format for the last method called.
public string LastErrorText {get; }
Error information in plain-text format for the last method called.
public string LastErrorXml {get; }
Error information in XML format for the last method called.
Methods
public bool CreateDcfFile(string filename);
Writes a .dcf file using the property settings and data contained within the calling object.
public string GetHeaderField(string fieldName);
Returns a header field value by field name. Returns a null on failure
public bool LoadDcfData(byte[] data);
Loads a .dcf file from in-memory data.
public bool LoadDcfFile(string filename);
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.
public void LoadUnencryptedData(byte[] data);
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
public bool LoadUnencryptedFile(string filename);
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
public bool SaveDecrypted(string filename);
Decrypts the data contained within the OMA DRM object and saves the result to an output file.
public bool SaveLastError(string filename);
Saves the last error information to an XML formatted file.
public void SetEncodedIV(string encodedIv, string encoding);
Sets the initialization vector via an encoded string. The encoding may be "base64", "hex", "url", or "quoted-printable".
public bool UnlockComponent(string b1);
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.
|