dcsimg

How should I encrypt or decrypt a password to be transmitted or stored in a file using the Java Security API?

John Zukowski

The standard Java security classes (JCA) do not support encryption. Of the standard extension libraries, you must use the Java Cryptography Extension (JCE) classes for encryption and deal with the export restrictions. See the CipherInputStream and CipherOutputStream classes of the JCE.