Results 1 to 6 of 6
Thread: encrypt a folder
- 03-18-2009, 05:06 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 3
- Rep Power
- 0
- 03-18-2009, 06:25 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,545
- Rep Power
- 11
Operating systems (or file systems) typically let you set the access rights that various users have to various files and directories. Typically these are much more precise than "can access" vs "can't access". If your problem really is access control, then use the mechanism your file system or OS provides.
Encryption is something else. Encryption aims at making the file's contents unavailable to anyone who doesn't possess a suitable key. That is copies are as protected as their encrypted originals. There is a list of cryptographic file systems here: List of cryptographic file systems - Wikipedia, the free encyclopedia.
Finally an actual Java question: how would you visit all of the files and directories within a given directory? There is a code example of this at Java Developers Almanac. What they call process() is a method that you would implement to do the actual encryption.
- 03-19-2009, 11:46 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 3
- Rep Power
- 0
When i read all files as byte stream, i can encrypt the files one by one so that they cant be opened...... Afterwards i need to even rename or encrypt the folder so tat even tat cant be opened.....Can u please suggest me how i can rename it or encrypt the folder so tat it cant be opened
- 03-19-2009, 05:34 PM #4
I'm not sure why you are doing this, but Java can't encrypt a folder. A folder is part of the OS, and it contains no data. In addition, using Java to encrypt the contents of a file is easy, but automating that process, especially the decrypt part, is not.
- 03-19-2009, 07:46 PM #5
Member
- Join Date
- Mar 2009
- Posts
- 3
- Rep Power
- 0
i'm doin locking folders and files as a module in my project.... So, i'm thinking of encrypting a folder so that it wont be opened..... But i'm thinking a direct method for reading a folder would make it easier instead storing entire directory structure to get back files when decrypting....
- 03-20-2009, 12:27 AM #6
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
Similar Threads
-
China style encrypt tool V2009
By bot2085 in forum Advanced JavaReplies: 1Last Post: 02-25-2009, 03:31 PM -
China style encrypt tool V2009
By bot2085 in forum New To JavaReplies: 0Last Post: 02-23-2009, 03:28 PM -
want to run my code from any folder ?
By Shyam Singh in forum New To JavaReplies: 1Last Post: 08-12-2008, 01:31 PM -
folder cloning
By jad in forum Advanced JavaReplies: 1Last Post: 07-01-2008, 12:28 AM -
add password to folder
By ismailsaleh in forum AWT / SwingReplies: 1Last Post: 01-08-2008, 05:46 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks