0

How to encrypt / decrypt a video file using Flash AS3. Can someone help me with an example code?

I have done a flash video player (.exe), and there are videos in a folder and those videos can be loaded and played through my flash player. But I want those videos to be encrypted and the decryption should only happen in my flash video player to be able to play the video. This way no one can steal the videos.

Can anyone point an example or tutorial on encrypting or decrypting a file through Flash AS3. Can someone help please??

krish
  • 59
  • 5
  • 1
    **Please Fix or Update this Question**. Do any research before posting?? What have you tried? Why tag `as3crypto`?.. What does encrypt/decrypt mean in this question exactly? Let's make sure you're not confusing "encrypt" with "encode" etc. There is no "example code" to show you because encrypt means **many different things** and it all depends on what **you're trying to achieve**. A one sentence effort from you deserves a one sentence answer, dont you think? So I suggest you plan this process, write the code and if any problems then show us **your code** for any volunteers to help you. – VC.One Mar 15 '16 at 06:56
  • @VC.One Updated now...Thanks... – krish Mar 15 '16 at 08:30
  • I seriously doubt you searched "the whole google". 263k results on "How to encrypt / decrypt video file using Flash AS3" - that would take days just to scan. – Brian Mar 15 '16 at 12:41

1 Answers1

0

While it's possible in theory it's impractical in reality since the decryption should happen at runtime and imply loading the entire video in memory, then decrypting that entire video and finally playing it. The whole process would take minutes for a small video and dozens of minutes for a big one with a high risk of making the OS run out of memory. This would only prevent a normal user from stealing the video, a beginner hacker would still have no problem stealing it since the decryption code would be included in the app.

There's only one way to play videos safely and it's via a streaming media server.

BotMaster
  • 2,233
  • 1
  • 13
  • 16