Archived

This topic is now archived and is closed to further replies.

DigitalChaos

Password Protecting a Folder

Recommended Posts

DigitalChaos    215
I am lookin to create a program to password protect folders. To keep sensitive data away from prying eyes. I''m mainly wanting to use this on my laptop and I take it a lot of places so I want to keep some folders locked. I have found some programs that do this, but they don''t do exactly what I need. They lock folders, and once they are unlocked, they are unlocked for good. I want to create my own program that can keep folders locked, and every time you want to open it, you have to enter a password, unless you permanently unlock it through the program. My problem is, I''m not sure how all of this is done. I''m not sure how to program this. If anyone can give me some direction in this, please tell me. I have been trying to find information on this, but I can''t find any. Thank you.

Share this post


Link to post
Share on other sites
Mastaba    761
What you are looking for is a shell extension. These can be fairly complicated apps to write. Especially a custom folder view which is what you would need. This is covered in the Platform SDK under Advanced Shell Techniques/Creating a Shell Namespace Extension.

Share this post


Link to post
Share on other sites
Mastaba    761
A easier way, without doing it via shell extension, is to simply create a customized archive app, that works like a folder, but isn''t really a folder.

Share this post


Link to post
Share on other sites
DigitalChaos    215
Well, ok, i was thinking this, please tell me if this would work.

Select a folder, then encrypt it and all files and subdirectories inside it. Once it is clicked you are prompted for a password, if you get the password correct a window opens up showing the files and you can view them. then when you close the window, it is automatically password protected again. I would store the password as a hash in the registry. Is this a good idea and would it work? If so, I need a bit of help on what kind of things i need to teach myself in order to create this program. I know programming (C/C++), I''m just not sure on what specifics i need to learn. thank you.

Share this post


Link to post
Share on other sites
Zidane    152
Idea:

Make your program the registered program for a ceartain file extension (ie .folder) now when you double click on the file it should challange you for the password for the archive. Now as you said you could keep one generic pasword for all .folder files are you could put the password into the file somehow (less secure tho)

The archive itself is where all the files are encrypted into, you could use a normal encryption method (zip for example) but just add some extra bits at the begining and end of file to fool normal zip utilities like winzip.


Knowladge required:

* Some for of GUI toolkit, be it MFC, .NET etc
* Folder traversing (FindFirst etc) for the encryption of new files, mentioned under the win32 api
* Encryption algorthim (zip for example)
* registry coding to allow your program to be the native program for a ceartain file type


Hope this helps.





Share this post


Link to post
Share on other sites
DigitalChaos    215
Zidane, that''s a great idea! I would have no problem creating the GUI. I''ll have to research and learn about folder traversing and registry coding. How would I go about making a good encryption algorithm? Would I create my own file extension?

Share this post


Link to post
Share on other sites
Zidane    152
A good encryption algorthim?

Hmm, well for starters I wouldnt code my own, they are nasty things. There are some pretty good standard ones out there. Here Ive compiled a list of a few

All the ones below offer different algorithims, its up to you which one to choose. Remember the ones that say very safe encryption will in general be slower. Y

This one isnt completly free (10 second delay on apps that use it) but it seems good. clicky

This i havent viewed lately, but seems good. clicky

Just googled this one, seems good at a first glance. Nice list of free libraries clicky


Remember what you want to do is encrypt the files and then put them into an single file archive. Then maybe even encrypt the archive if you feel its needed.






Share this post


Link to post
Share on other sites
Zidane    152
quote:
Original post by Mastaba
DO NOT use .folder as the extension. That is what Windows uses for real folders.


Does it? Hmm never knew that. Well as they say, you learn something everyday :-)

Share this post


Link to post
Share on other sites