Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes I/O and Streams and the fly likes how to set password to file with java program.? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "how to set password to file with java program.?" Watch "how to set password to file with java program.?" New topic
Author

how to set password to file with java program.?

sureshreddy govindu
Greenhorn

Joined: Jun 08, 2011
Posts: 29
hi all,

i am set password to file with java program .. how to achieve through java program??


Thanks



Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
Few file formats support encryption; which one are you asking about?


Ping & DNS - my free Android networking tools app
sureshreddy govindu
Greenhorn

Joined: Jun 08, 2011
Posts: 29

Thanks to reply

.txt file,
i want to put password mytext.txt file.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
Text files don't have passwords. Consider ZIP or PDF.
Shahzad Latif
Greenhorn

Joined: Apr 28, 2011
Posts: 28
How about converting text file to PDF first, and then applying user or master password on this PDF? You can also apply 128 bit encryption on the PDF file using Aspose.Pdf for Java.


Developer Evangelist @ Aspose. I love to explore and learn new technologies and help other developers along the way.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to set password to file with java program.?
 
Similar Threads
Problem in Password encryption
Password protection in java.io.File
Needed a small logic regarding logging into an application with out database.
suggest me a better way to store passwords!!
JavaMail password store