OMA::Download::DRM::CF - Perl extension for formatting content objects according to the OMA DRM 1.0 specification
Packs & encrypts content objects according to the Open Mobile Alliance Digital Rights Management 1.0 specification
use OMA::Download::DRM::CF;
my $cf = OMA::Download::DRM::CF->new( ### Mandatory 'key' => '0123456789ABCDEF', 'data' => \$data, 'content-type' => 'image/gif', 'content-uri' => 'cid:image239872@foo.bar', 'Rights-Issuer' => 'http://example.com/pics/image239872', 'Content-Name' => 'Kilimanjaro Uhuru Peak', ### Optional 'Content-Description' => 'Nice image from Kilimanjaro', 'Content-Vendor' => 'IT Development Belgium', 'Icon-URI' => 'http://example.com/icon.gif', );
get or set the 128-bit ASCII encryption key
print $cf->key; $cf->key('0123456789ABCDEF');
Get or set the reference to the binary content data
print ${$cf->data}; $cf->data(\$data);
Get or set the content MIME type
print $cf->content_type; $cf->content_type('image/gif');
Get or set the content URI
print $cf->content_uri; $cf->content_type('image12345@example.com');
Get or set a header
print $cf->header('Content-Vendor'); $cf->header('Content-Vendor', 'My Company');
Returns the formatted content MIME type
print $cf->mime;
Returns the formatted content file extension
print $cf->extension;
Formats the content object
print $cf->packit;
* OMA-Download-CF-V1_0-20040615-A
* WAP-230-WSP-20010705-a
* RFC2760
* Crypt::Rijndael
* RFC2630 6.3
Bernard Nauwelaerts, <bpgn@cpan.org>
Copyright (C) 2006 by Bernard Nauwelaerts.
Released under the GPL.
To install OMA::Download::DRM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OMA::Download::DRM
CPAN shell
perl -MCPAN -e shell install OMA::Download::DRM
For more information on module installation, please visit the detailed CPAN module installation guide.