CkOmaDrm Perl Programming Reference Documentation
CkOmaDrm
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
# str is a CkString object (output) get_Base64Key( str )
The 16-byte secret key for encryption/decryption in Base64 encoded form.
# str is a CkString object (output) get_ContentType( str )
The MIME media type of the DRM protected content.
# str is a CkString object (output) get_ContentUri( str )
The unique URI for the DRM protected content.
# data is a CkByteData object (output) get_DecryptedData( data )
Decrypts and returns the DRM protected content. The secret key must be set correctly beforehand. The the secret key is incorrect, gibberish is returned.
# Returns an integer value get_DrmContentVersion( )
The version of the DRM content format specification used to produce this content object.
# data is a CkByteData object (output) get_EncryptedData( data )
This property provides access to the encrypted data contained within the DRM content.
# str is a CkString object (output) get_Headers( str )
Header fields separated by CRLF line endings containing additional meta data about the DRM content.
# data is a CkByteData object (output) get_IV( data )
The initialization vector to be used when encrypting the DRM protected content.
# str is a CkString object (output) LastErrorHtml( str )
Error information in HTML format for the last method called.
# str is a CkString object (output) LastErrorText( str )
Error information in plain-text format for the last method called.
# str is a CkString object (output) LastErrorXml( str )
Error information in XML format for the last method called.
# Returns a boolean value get_Utf8( )
# b is a boolean (input) put_Utf8( b )
When set to true, all "const char *" arguments are expected to be utf-8 strings. If set to false, the "const char *" arguments are expected to be ANSI strings.
Methods
# filename is a string (input) # Returns a boolean value CreateDcfFile( filename )
Writes a .dcf file using the property settings and data contained within the calling object.
# fieldName is a string (input) # fieldVal is a CkString object (output) # Returns a boolean value GetHeaderField( fieldName, fieldVal )
Returns a header field value by field name. Returns 1 for success, 0 for failure.
# data is a CkByteData object (input) # Returns a boolean value LoadDcfData( data )
Loads a .dcf file from in-memory data.
# filename is a string (input) # Returns a boolean value LoadDcfFile( 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.
# data is a CkByteData object (input) LoadUnencryptedData( 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
# filename is a string (input) # Returns a boolean value LoadUnencryptedFile( 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
# filename is a string (input) # Returns a boolean value SaveDecrypted( filename )
Decrypts the data contained within the OMA DRM object and saves the result to an output file.
# filename is a string (input) # Returns a boolean value SaveLastError( filename )
Saves the last error information to an XML formatted file.
# encodedIv is a string (input) # encoding is a string (input) SetEncodedIV( encodedIv, encoding )
Sets the initialization vector via an encoded string. The encoding may be "base64", "hex", "url", or "quoted-printable".
# unlockCode is a string (input) # Returns a boolean value UnlockComponent( unlockCode )
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.
# Returns a string base64Key( )
The 16-byte secret key for encryption/decryption in Base64 encoded form.
# Returns a string contentType( )
The MIME media type of the DRM protected content.
# Returns a string contentUri( )
The unique URI for the DRM protected content.
# fieldName is a string (input) # Returns a string getHeaderField( fieldName )
Returns a header field value by field name.
# Returns a string headers( )
Header fields separated by CRLF line endings containing additional meta data about the DRM content.
# Returns a string lastErrorHtml( )
Error information in HTML format for the last method called.
# Returns a string lastErrorText( )
Error information in plain-text format for the last method called.
# Returns a string lastErrorXml( )
Error information in XML format for the last method called.
# key is a string (input) set_Base64Key( key )
Sets the base64-encoded secret key to be used in encrypting and decrypting the rights-managed data. (128-bit AES encryption is used, so the key should represent 16-bytes of data.)
# contentType is a string (input) set_ContentType( contentType )
The content type of the DRM content.
# contentUri is a string (input) set_ContentUri( contentUri )
The content URI for the DRM protected content object.
# headers is a string (input) set_Headers( headers )
Header fields separated by CRLF line endings containing additional meta data about the DRM content.
# data is a CkByteData object (input) set_IV( data )
The initialization vector to be used when encrypting the DRM protected content.
|