[英]How to play encrypted video file using WindowsMediaPlayer?
I encrypt my .mp4
into a custom format ( .opu
). 我将.mp4
加密为自定义格式( .opu
)。 Now I should decrypt my file and save them into temp folder at the start of my application. 现在,我应该解密我的文件,并在应用程序开始时将它们保存到temp文件夹中。 and play them using WindowsMediaPlayer
control in C#. 并使用C#中的WindowsMediaPlayer
控件播放它们。 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? 如何使用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 这个想法是挂钩函数,如ReadFile来提供解密的数据,SetFilePointer来维护“文件”中的当前指针等。您可以在http://www.boxedapp.com/encrypted_video_streaming.html上查看示例之一。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.