Hello Everybody

i am using VS2010 C# Windows application

i have a doubt

how can we encrypt a video file (i have three video files which should not copy and it should not be opened directly)

i have designed a application that has a form1 and three buttons in it as the button is clicked the video will start playing

i have added a path of the video file in the URL of player

but the problem is how to encrypt those video file (it should not be copied and should not be opened when it is clicked directly on the icons of video files) but the videos should be able to play when the button is clicked in the form of application how to do this

please let me know with a piece of code please

This really depends on how much encryption you want:

Depending on the video: A cheap trick could be to capture the first 100 bytes (or so) and store them elsewhere and zero-out the bytes in the original file (and of course, change the extension to something uncommon).
...then, to play the file, put back the 100 bytes.

Depending on the size of the file, I'm imagining you could do this in RAM.

...but even the File.Encrypt() will render the file unusable outside of the current account.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.