aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Encrypting and Decrypting .properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Encrypting and Decrypting .properties file" Watch "Encrypting and Decrypting .properties file" New topic
Author

Encrypting and Decrypting .properties file

vi tri
Greenhorn

Joined: Apr 16, 2012
Posts: 1
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
Rancher

Joined: Sep 21, 2011
Posts: 2408
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

Joined: Aug 11, 2007
Posts: 4659
    
    5

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Encrypting and Decrypting .properties file