I am using Jasypt to encrypt and decrypt confidential configuration data in a Java application. Although its easy to use a command line to encrypt a value and replace in configuration file however it is not practical for file containing hundreds of such values and the file is different for different environments and can not be automated.
So what i would like to do is take a non encrypted file and encrypt everything in one go. Using plain java how can i replace value of an configuration data while running through it line by line. Thanks