开发者

Ideas on making a video file play only within my app on iPad

The video files I have are 500mg-1gb. I hav开发者_开发百科e tried AES encryption and it takes too long to decrypt and play. I was hoping to modify the mp4 files within my app in someway when i store them that if someone does copy them off of the iPad they will appear "broken" and unplayable.

Can I accomplish this with moving some bits around in the file and then putting them back before I play it? Is there a fast encryption the iPad supports?

I am not very familiar with encryption and how to do this. Please someone point me in the right direction. Any ideas would be appreciated.


Try XOR encoding. It should be much faster to decrypt but don't expect no ultra-speed if you are trying to decrypt the whole file at once. My guess would be to encode those video files in chunks of some size, each encrypted with a XOR which uses some pre-shared key(already existing on the iPod) to decrypt video data on the go.

After all - you are trying to achieve something that all major record and producing companies have been trying to accomplish for years. So good luck, you will need it.


Perhaps you will want to look at DRM support on the iPad? Similarly to what Artis has discussed, record companies have been trying to do this for a long time and I believe DRM is their best choice so far.


Here is what I came up with for anyone who wants something that might not be full proof, but wants to make it hard for anyone to take video or anything from your iPad app...

This method requires no encryption and no files in memory so it works just as fast no matter the size of the file...

Using a file handle I read the first so many bytes from the media file and stored them in another file. I then replaced those bytes with garbage data...this breaks the mp4 file for any media player. In the app when someone requests that file I check to see if there is the corresponding file with the bytes in it and then I just replace the garbage with the actual bytes and play the file.

I copied the files off of the iPad to test and they will not play in any player I have tried.

Like I said it's not full proof and if someone wanted to they can put those files together, but they would need some knowledge of how many bytes I replaced and where in the file I got them from. For me this worked great.

Thanks for the replies and if anyone has other suggestions post them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜