For encryption I use something like this:
SecretKey aesKey = KeyGenerator.getInstance(\"AES\").generateKey(); StringEncrypter aesEncrypt = new StringEncrypte
I've stored keys in java keystore files. Here's an article that may help you out
http://www.informit.com/articles/article.aspx?p=170967&seqNum=3