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?
Asked
Active
Viewed 4,755 times
0

Mohamad Shiralizadeh
- 8,329
- 6
- 58
- 93
2 Answers
1
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.

Kevin
- 1,462
- 9
- 9
-
How to play using `memorystream`? – Mohamad Shiralizadeh Jun 19 '15 at 14:51
-
You'll find a couple of answers to that, along with links here http://stackoverflow.com/questions/12405635/play-videos-from-memory-stream – Kevin Jun 19 '15 at 18:13
0
There is a way using virtualization, i.e. 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

Artem Razin
- 1,234
- 8
- 22