• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Encrypting and Decrypting .properties file

 
vi tri
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Encrypting and Decrypting contents of .properties file

I am new to java security API.I want to encrypt the contents of the file and write it back in the same file and whenever those contents are to be used by java code they are to be decrypted and then used
 
Tim Moores
Bartender
Posts: 2839
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See http://www.coderanch.com/how-to/java/SecurityFaq#encryption for some introductions and example code of how to use JCE, which is the standard Java API for encryption. Note that you should no longer use DES, but AES instead.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note, this is probably a bad idea. It is unlikely to give you the security that you think you could gain with this approach.

You could have to describe what you are trying to do before I could make better comments.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic