
OMA::Download::DRM - Perl extension for packing DRM objects according to the OMA DRM 1.0 specification

This module encodes data objects according to the Open Mobile Alliance Digital Rights Management 1.0 specification in order to control how the end user uses these objects.

use OMA::Download::DRM;

my $drm = OMA::Download::DRM->new(%args);

Returns download object uid
print $drm->uid;
Returns the MIME type
print $drm->mime;

Forward-lock delivery
my $drm = OMA::Download::DRM->new(
'content-type' => 'image/gif', # Content MIME type
'data' => \$data, # GIF image binary data reference
);
print "Content-type: ".$drm->mime."\n\n"; # Appropriate MIME type
print $drm->fw_lock(); # Forward lock
Combined delivery
my $drm = OMA::Download::DRM->new(
'content-type' => 'image/gif', # Content MIME type
'data' => \$data, # GIF image binary data reference
'domain' => 'example.com'
);
print "Content-type: ".$drm->mime."\n\n"; # Appropriate MIME type
print $drm->combined($permission, %constraint); # Combined delivery. See OMA::Download::DRM::REL.
Separate delivery. Content encryption and packing.
my $drm = OMA::Download::DRM->new(
'content-type' => 'image/gif', # Content MIME type
'data' => \$data, # GIF image binary data reference
'domain' => 'example.com',
'key' => '128bit ascii key'
);
print "Content-type: ".$drm->mime."\n"; # Appropriate MIME type
print "X-Oma-Drm-Separate-Delivery: 12\n"; # The terminal expects WAP push 12 seconds later
print $drm->separate_content($rights_issuer, $content_name); # Encrypted content
You then need to send the rights object separately
Separate delivery. Rights object packing.
my $rights = $drm->separate_rights($permission, %constraint) # you have to send this rights object via WAP Push.


1.00.07 Various improvements
1.00.04 First public release

Bernard Nauwelaerts, <bpgn@cpan.org>

Copyright (C) 2006 by Bernard Nauwelaerts, IT Development Belgium
Released under the GPL.