I found a post on the java.sun forums regarding this issue. A solution, which I have tried and it worked for me unlike many of the suggestions that others made that were "supposed" to have worked for them, is using javax.commerce.util.BASE64Encoder and Decoder. These classes can be found in the Java Wallet API at java.sun.com. Put the jecf.jar file in your classpath and you're ready to go. Start by BASE64Encoding the unecrypted String first then encrypting it. Now you may store it or whatever. Whenever you need it decrypt it then BASE64Decode it. Did the trick for me. Good luck.
Why is the word "abbreviation" so long? And this ad is so short?