| Author |
No Such Algorithm Exception
|
jason zepris
Greenhorn
Joined: Jun 25, 2011
Posts: 8
|
|
Hi All,
I am using Java 1.6 and am getting the following exception:
Exception in thread "main" java.security.NoSuchAlgorithmException: no such algorithm: AES/CBC/PKCS5Padding for provider SunJCE
Any one know what's wrong? I've read that this algorithm should be available for this provider.
|
 |
Tim McGuire
Ranch Hand
Joined: Apr 30, 2003
Posts: 819
|
|
I think you are mixing up KeyGenerator.getInstance and Cipher.getInstance
KeyGenerator.getInstance only takes an String for algorithm so getInstance("AES","JCE") is what you want
Cipher takes a string for transformation which is what you are trying to give.
See http://docs.oracle.com/javase/1.5.0/docs/guide/security/jce/JCERefGuide.html
|
 |
jason zepris
Greenhorn
Joined: Jun 25, 2011
Posts: 8
|
|
Yeah I did confuse it. Thank you very much.
|
 |
 |
|
|
subject: No Such Algorithm Exception
|
|
|