Ulf Dittmer wrote:I'm not sure if JCE works on JME, but you have the KeyGenerator import commented out without which the compiler can't know about the class.
If JCE does not work on JME, check out the BouncyCastle API - it has a version that runs on JME.
Rob Prime wrote:
shivendra tripathi wrote:Why don't you use BASE64Encoder and BASE64Decoder classes?
Because that's not proper encrypting; anyone who has a Base64 decoder can decode the "encrypted" string without even needing a key. javax.crypto.Cipher is a better option. I always use it in combination with the Blowfish algorithm