Troubleshooting

Locating Algorithms

Q1:Why can't I create a Cipher that uses DES?
You probably don't have the JCE installed correctly. If you took the easy way and installed the JCE JAR files to your jre\lib\ext directory, you must still add the new security provider to the jre\lib\security\java.security file. The line you add usually looks something like this:
security.provider.3=com.sun.crypto.provider.SunJCE
Q2:I know the JCE is installed properly; why can't I find DES?
Make sure you spell it properly: DES, all capital letters. If that doesn't work, try specifying "SunJCE" as the second parameter, which is the security provider.

Encryption and Decryption

Q1:I can encrypt with DES, DESede, or Blowfish; why do I get an error about missing parameters ...

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.