Solved

Protecting  any media files and running through my program

Posted on 2004-08-06
9
149 Views
Last Modified: 2010-05-03
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.
0
Comment
Question by:itmastero
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
9 Comments
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11742263
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
0
 

Author Comment

by:itmastero
ID: 11756429
How do i do that with a media file which is having changed extension. can you give me the code.
0
 
LVL 22

Accepted Solution

by:
DarkoLord earned 110 total points
ID: 11761351
Well I can give you some steps/directions:

First make file encryption/decryption... you can find an example here:
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=54321&lngWId=1

Then make a function that will open the file and ask you for password... when correct password is entered, the file is decrypted and copied to a temporary location with original file extension and then run...

Then you can register your own file extension and make that all files with that extension will open in your program... example here:
http://www.vbforums.com/showthread.php?s=&threadid=270865&highlight=file+extension+register

Darko
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:itmastero
ID: 11871728
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.
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11874601
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)...
0
 

Author Comment

by:itmastero
ID: 12468863
Really speaking i have no received any better solution. So this can be disposed off. Thank you.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month11 days, 2 hours left to enroll

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question