Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Protecting  any media files and running through my program

Posted on 2004-08-06
9
Medium Priority
?
150 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 440 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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

715 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