简体   繁体   中英

How to play encrypted video file using WindowsMediaPlayer?

I encrypt my .mp4 into a custom format ( .opu ). Now I should decrypt my file and save them into temp folder at the start of my application. and play them using WindowsMediaPlayer control in C#. So I have the risk of stealing my files from temp folder. What is the best way to prevent stealing my files? How to play encrypted video file using WindowsMediaPlayer?

The best way would be to perform the decrypt to a stream in memory and play the video from there. That way there is never an on-disk file to steal.

There is a way using virtualization, ie hooks. The idea is to hook functions like ReadFile to provide decrypted data, SetFilePointer to maintain current pointer within a "file" etc. You can view one of the examples at http://www.boxedapp.com/encrypted_video_streaming.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM