Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set password to file with java program.?

 
sureshreddy govindu
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

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


Thanks



 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Few file formats support encryption; which one are you asking about?
 
sureshreddy govindu
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks to reply

.txt file,
i want to put password mytext.txt file.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Text files don't have passwords. Consider ZIP or PDF.
 
Shahzad Latif
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic