this is my code:
static {
Security.addProvider(new BouncyCastleProvider());
}
…
final Cipher sifra = Cipher.getInstance(“AES/CBC/PKCS7Padding”);
Junit works fine but When I deploy my application to weblogic server I got these exception:
java.security.NoSuchAlgorithmException: Cannot find any provider supporting AES/CBC/PKCS7Padding
Can you hlp me what is wrong ?
That’s the old strange problem of different versions and missing cryptography files. I believe PKCS5Padding instead of PKCS7Padding will work. Anyway, it has something to do with Unlimited Strength Jurisdiction Policy Files which can be downloaded from Oracle … or some other missing part or old version of Java Cryptography Extension.