Link to home
Start Free TrialLog in
Avatar of itmastero
itmastero

asked on

Protecting any media files and running through my program

Can i protect any media file with extention mpeg,avi,wav so that it couldn't open in any player. And then can i write a program so that i can pass a password to that protected media file and it runs in the player which i have created in that program.
Avatar of DarkoLord
DarkoLord
Flag of Slovenia image

You can write a program to encrypt/protect the file using password, but in then you have to change the file extension, otherwise your program wont run if you run that media file (well except if you set your program as a default program for all media files)

Darko
Avatar of itmastero
itmastero

ASKER

How do i do that with a media file which is having changed extension. can you give me the code.
ASKER CERTIFIED SOLUTION
Avatar of DarkoLord
DarkoLord
Flag of Slovenia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Darko the links you gave were good enough to encrypt small size media files but if i have a whole big movie of 3 hrs. then that takes a long time to encrypt and decrypt it so thats like a person should have grt patient to wait for that. can u suggest me some faster way to do that.
Well other way would be to just add some encrypted strings at the end of the file... that way the original media file becomes inaccessible... so when user enters the password, you try to decrypt the string at the end of the file and if successful, you copy the file without that crap at the end to another location and then play it

One thing though, you still have to copy the file to another location after "decrypting" (if you dont do that, the user could just crash your program and the decrypted file would still remain there)...
Really speaking i have no received any better solution. So this can be disposed off. Thank you.