Results 1 to 15 of 15

Thread: Folder Encryption

  1. #1

    Thread Starter
    Hyperactive Member anita2002's Avatar
    Join Date
    Dec 2001
    Location
    In u'r Heart
    Posts
    482

    Folder Encryption

    When my application will be burnt on CD there will be a folder of "Images" which will contain all the images used in my application. So can I encrypt the whole folder and decrypt it on the system at run time so no one can able to copy the images? Does anyone have code or some other way?
    Thanks in advance,
    Anita
    Can't imagine life without VB
    (Various Boyfriends)

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Write an algorithm to pack all files in a directory into the one single large file.
    Then just encrypt the file.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Hyperactive Member anita2002's Avatar
    Join Date
    Dec 2001
    Location
    In u'r Heart
    Posts
    482
    Originally posted by plenderj
    Write an algorithm to pack all files in a directory into the one single large file.
    Then just encrypt the file.
    Thanks Plenderj,
    But i'm not good at such things. Even i don't know how to pack all these files in a single file?
    Can anyone provide me such code or alogorithm?
    Please help.
    Anita
    Can't imagine life without VB
    (Various Boyfriends)

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well there's no specific way of doing it.
    Easiest thing to do would be to use Winzip to zip up the entire directory, make a self extracting executable, then compress that.

    Pretty much so the same thing, except the winzip way's easier
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  5. #5

    Thread Starter
    Hyperactive Member anita2002's Avatar
    Join Date
    Dec 2001
    Location
    In u'r Heart
    Posts
    482
    Originally posted by plenderj
    Well there's no specific way of doing it.
    Easiest thing to do would be to use Winzip to zip up the entire directory, make a self extracting executable, then compress that.

    Pretty much so the same thing, except the winzip way's easier
    Thanks plenderj,
    But i want that the user can't access the images which i wll burn
    on my CD with my application. If i make the self extracting with winzip, the user can easily extract it and get the images. So is there any other way with which i can encrypt the folder of "Images" and decrypt that folder a runtime at some remote location on the users PC? So that i can delete the folder programatically when the user closes my application.
    Is it possible?
    help....
    Anita
    Can't imagine life without VB
    (Various Boyfriends)

  6. #6
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    for what plenderj said you could add a password to the zip file thats really long and random, like "h3 k2 4 k gj 3k 45 n g n3j k 4" . and since there is no other way to crack winzip files other than brute force it should be good enough.

    and you can't change folders like files. windows will give you an 'Access is Denied'
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  7. #7

    Thread Starter
    Hyperactive Member anita2002's Avatar
    Join Date
    Dec 2001
    Location
    In u'r Heart
    Posts
    482
    Originally posted by BuggyProgrammer
    for what plenderj said you could add a password to the zip file thats really long and random, like "h3 k2 4 k gj 3k 45 n g n3j k 4" . and since there is no other way to crack winzip files other than brute force it should be good enough.

    and you can't change folders like files. windows will give you an 'Access is Denied'
    Thanks BuggyProgrammer,
    But r u sure that i can't acces or interfere folders in windows? I think most of the softwares extract their files in "c:\windows\temp " what do u think?
    Anyone please corect me if i'm worng.
    Well..i can make the zip file of Images. But can anyone tell me
    how can i extract the winzip file having password programatically from vb?
    help.....
    Anita
    Can't imagine life without VB
    (Various Boyfriends)

  8. #8
    Hyperactive Member ZeroCool's Avatar
    Join Date
    Feb 2002
    Location
    In front of my computer
    Posts
    423
    Example:

    VB Code:
    1. Dim ClsDES as ClsDES
    2.  
    3. Private Sub form_Load()
    4. Set ClsDes = New CLsDes
    5. End Sub
    6.  
    7. Private sub CmdEncrypt_Click()
    8. ClsDes.EncryptDir"c:\TestDir\", "Password"
    9. End Sub
    10.  
    11. Private sub CmdDecrypt_Click()
    12. ClsDes.decryptDir "c:\TestDir\", "Password"
    13. End Sub

    Add The Attached Module To The Project
    Attached Files Attached Files
    Visual Baisc 6 (SP5)
    Windows Xp

  9. #9
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    I said use winzip, and then encrypt the self extracting executable
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  10. #10
    khalik
    Guest
    if i am not mistaken what anita is looking for is to avoid the user to copy or may be access those gif... but is the app going to access the gif... any loading using gif98...something

    thanks zero_cool the class will be of gr8 use...

    i think the sub EncryptDir is missing

  11. #11
    Lively Member
    Join Date
    Jul 2002
    Posts
    75

    Reply : encryption

    hello Anita,

    I have worked on encryption and decryption........

    and U can encrypt and decrpyt the images and stored to a folder ... at the run time .

    there r different security levels of cryptography..... tell me just what level of security u want ??


    Well, if u want the code u can mail me at
    [email protected]
    till then
    see ya
    Prasad

  12. #12
    Hyperactive Member ZeroCool's Avatar
    Join Date
    Feb 2002
    Location
    In front of my computer
    Posts
    423
    Yes heres the module with EncryptDir and DecryptDir
    Visual Baisc 6 (SP5)
    Windows Xp

  13. #13
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    well that really isn't encrypting the Dir itself, it is just looping through the files and encrypting all the files.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  14. #14
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    and it doesn't even work
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  15. #15
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,526
    If you just want something that can compress and encrypt a set of files for distribution, you can use PC Guardian Secure Export.

    http://www.pcguardian.com

    However, if you want a foolproof way to prevent your images from being copied by anyone, including authorized users of your application, there really is no method that can't be bypassed. Any image on the screen can be captured, so if you are displaying the images, then they can be copied. Perhaps a more detailed explanation of exactly what you are trying to prevent as well as the level of technical expertise of the users of your software might be helpful. We might then suggest a method that would work for most cases.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width