I\'d like to store a serialized object to a file however I\'d like to make it encrypted. It doesn\'t need to be really strong encryption. I just want something easy (preferably
You should look into Jasypt. It has a bunch of utility functions to make this easy.
...
BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
textEncryptor.setPassword(myEncryptionPassword);
...
String myEncryptedText = textEncryptor.encrypt(myText);
...
String plainText = textEncryptor.decrypt(myEncryptedText);
...