Encrypt assets (video files) in Adobe AIR

I am trying to create a video player in Adobe AIR. I want to encrypt video files so that they do not spread outside the player. I don’t want to jump over hoops to create a solid system, but something simple that just doesn't allow 90-95% of users to share content.

I had a related question about SO in File Protection in Adobe AIR (Flex)

However, since the video file size definitely exceeds 10 MB, the above is not a solution.

There are many solutions for encrypting text strings, but I have not found any files to encrypt. Any help or pointers would be appreciated.

Many thanks.

Update: We are trying to achieve this as follows:

  • encrypt / confuse the first 50 binary characters of the video file and save it to your hard drive. this makes the file unplayable.
  • at runtime, decrypt the first 50 characters to get the source file and copy it to a temporary folder on your hard drive.
  • when exiting, delete the decrypted file and run the temp folder.

This solves most of our problems. This does not allow sharing a simple copy and paste. This is a simple solution, although maybe not very elegant.

The problem we are facing right now is that the temporary folder is not cleared. The file goes to the trash and can be easily restored from there!

+3
source share
4 answers

DVD, DVD HTTP- AIR, .

:

1 - , , DVD .

2 - Air HTTP-, , Air Flash Video Player <img src="localhost:5050/assetcode.jpg">

, , :

import com.hurlant.crypto.prng.ARC4;
            import com.hurlant.util.Hex;
            import com.hurlant.crypto.Crypto;
            import com.hurlant.crypto.symmetric.ICipher;

            var key:ByteArray = Hex.toArray(Hex.fromString("masterkey"));
            var rc4:ARC4 = new ARC4(key);

            var fs:FileStream = new FileStream();
            fs.open( content, FileMode.READ );
            var ba:ByteArray = new ByteArray();


            fs.readBytes( ba, 0, fs.bytesAvailable );
            ba.position = 0;
            fs.close();



            rc4.decrypt(ba);
            //cipher.decrypt(ba);

            innerSendHTML(s, ext2mime[content.extension], ba );

            ba.length = 0;

RC4, .

HTTP- http- Flash Camp 2010, google.

-

www.imaginacolombia.com

+2

, PHP - ? SWF , - (), .....

, , HTTP- X-sendfile ...

0

:

(1) 1000 .
(2) 1000 sqlite .
(3) 1000 .

, . , .

:

(4) 1000
(5) .

1-3.

0

Source: https://habr.com/ru/post/1741047/


All Articles