Folder Password Programs (Windows)?

This is a discussion on Folder Password Programs (Windows)? within the C Programming forums, part of the General Programming Boards category; I was wondering how folder password protecting programs work(so that i could write one)... at first i thought that they ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    83

    Folder Password Programs (Windows)?

    I was wondering how folder password protecting programs work(so that i could write one)... at first i thought that they might dump the contents into a file type (like *.zip)and pass. protect that. but then that wouldn't be password protecting the folder, then i thought maybe they encrypted it, but then why can't i open the folder and look at the ENCRYPTION (not the original), like if i were to encrypt a txt file? If this is a stupid question just say so.
    "What this country needs is more free speech worth listening to." - -Hansell B. Duckett

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Some may find this to be a stupid question. I find it to be a question asked by someone interested in encryption. Winzip encrypts its files. I think lw68 compression natively supports encryption for its compression. And yes, its output is unreadable to you and me. I think its compression uses encrypted compression tables that are made using the user password. Anyway, that is way more complicated than what you want. Start things off simple. My first c encryption program used a matrix made up from a 3 digit password. You may want to do something like that, or use a character conversion table. Like:
    Code:
    void simple_encrypt(char *param) {
        int i;
        char mytable[] = "jkdiqrazvnopwbctuxsefghlmy";
        for(i = 0; i < strlen(param); i++)
            param[i] = mytable[param[i]];
    }

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Oops almost forgot. Winzip decodes the encrypted data do that they become readable.

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    83

    k...but

    hmm u know any good recourses/websites that have specific information on how to write encryption (with C, not C++) , and im new to encryption so something for beginers. thx
    "What this country needs is more free speech worth listening to." - -Hansell B. Duckett

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231

    Re: k...but

    Originally posted by johnc
    hmm u know any good recourses/websites that have specific information on how to write encryption (with C, not C++) , and im new to encryption so something for beginers. thx
    Encryption isn't about a particular language, its about algorythms and such. You must understand the basics of these to then translate them into a language of your choice.

    There are of course many different methods of encrpytion. A google search for encryption tutorials will do you just fine, imo.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  6. #6
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Try the book Applied Cryptogrpah, by Bruce Schneier - it's got tons of code in C. Also, you can find the Handbook for Applied Cryptography free on the web.

  7. #7
    Registered User toaster's Avatar
    Join Date
    Apr 2002
    Posts
    161
    they have some examples shown on this site. take a look. as to encrypting folders, many programs have their own ways such as manipulating the use of windows and such.

    here's a simple approach ( a simple folder encryption):
    (note that it will not encrypt the contents inside the folder)

    just encrypt the folder name so there will be characters that Windows will not recognize thus Windows can't open it.
    think only with code.
    write only with source.

  8. #8
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    > just encrypt the folder name so there will be characters that Windows will not recognize thus Windows can't open it.

    WTF? That's not encryption... That's just hiding something... 2 seconds later, the file's open.

  9. #9
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by Govtcheez
    > just encrypt the folder name so there will be characters that Windows will not recognize thus Windows can't open it.

    WTF? That's not encryption... That's just hiding something... 2 seconds later, the file's open.
    Also, I'm pretty sure Explorer will show you the folders anyway. It certainly does if you create a folder by the name of 0xff (one character, which is not displayable).
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Application Data folder on Windows
    By idelovski in forum Tech Board
    Replies: 24
    Last Post: 11-29-2008, 10:57 AM
  2. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 03:44 AM
  3. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 06:05 PM
  4. I need some help with windows programs
    By DarkViper in forum Windows Programming
    Replies: 19
    Last Post: 11-09-2002, 08:38 PM
  5. Problem with Borland 5.5 Compiling Windows Programs
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 08-28-2001, 09:04 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21