NAME

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

DESCRIPTION

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.

SYNOPSIS

use OMA::Download::DRM;

CONSTRUCTOR

new

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

PROPERTIES

uid

Returns download object uid

print $drm->uid;

mime

Returns the MIME type

print $drm->mime;

METHODS

fw_lock

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

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_content

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_rights

Separate delivery. Rights object packing.

my $rights = $drm->separate_rights($permission, %constraint)  # you have to send this rights object via WAP Push.

SEE ALSO

OMA::Download::DRM::REL

OMA::Download::DRM::CF

REVISION INFORMATION

1.00.07 Various improvements

1.00.04 First public release

AUTHOR

Bernard Nauwelaerts, <bpgn@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Bernard Nauwelaerts, IT Development Belgium

Released under the GPL.