Solved

Protecting  any media files and running through my program

Posted on 2004-08-06
9
144 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
  • 3
  • 3
9 Comments
 
LVL 22

Expert Comment

by:DarkoLord
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:itmastero
Comment Utility
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
Comment Utility
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
Comment Utility
Really speaking i have no received any better solution. So this can be disposed off. Thank you.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now