How to play encrypted video file using WindowsMediaPlayer?

≯℡__Kan透↙ 提交于 2019-12-19 12:49:16

问题


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?


回答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.




回答2:


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



来源:https://stackoverflow.com/questions/30940230/how-to-play-encrypted-video-file-using-windowsmediaplayer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!