DRM for Images and Text in Stacks

Ken Ray kray at sonsothunder.com
Tue Mar 7 10:40:42 EST 2006

On 3/7/06 3:42 AM, "Sivakatirswami" <katir at hindu.org> wrote:

> Not so for a Rev stack. If you deployed a rich media library as
> stacks that  had copyright images stored in a substack, even if one
> sets a password on a stack, any other developer could open substack
> "image library" and go through the cards with the images on them in
> the application browser.

You could do this: for each image that needs to be displayed on the card in
the substack, put the imageData of the image(s) into custom properties of
the card, encrypted with 'base64encode' or compressed with 'compress' (or
use a custom algorithm of your own), and then set the imageData of the image
objects themselves to empty. Then, only when running in your standalone,
unencrypt/decompress and pipe the imagedata from the custom props back into
the image objects on preOpenCard. Make sure the custom property name and the
actual object to which it is associated have different names or identifiers.
Then encrypt the stacks.

This way, the image data is safe from prying eyes (people would only see the
raw image data when looking at it with the Rev IDE's inspector), and since
the stack is encrypted and the custom prop and image objects have no obvious
connection, it would be difficult to figure out which image data goes with
which object and even if they could, the data is encrypted or compressed so
it's not a simple act of "set the imageData of img 1 to <prop>".

Here's a simple example using compress/decompress:

set the uStuff of this card to compress(the imageData of img 1)
put "" into img 1

set the imageData of img 1 to decompress(the uStuff of this card)

Hope this helps,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com

More information about the Use-livecode mailing list