aspose file tools*
The moose likes Security and the fly likes java.security.NoSuchAlgorithmException: Algorithm PBKDF2WithHmacSHA1 not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "java.security.NoSuchAlgorithmException: Algorithm PBKDF2WithHmacSHA1 not available " Watch "java.security.NoSuchAlgorithmException: Algorithm PBKDF2WithHmacSHA1 not available " New topic
Author

java.security.NoSuchAlgorithmException: Algorithm PBKDF2WithHmacSHA1 not available

Phanikumar Balla
Greenhorn

Joined: Jul 27, 2013
Posts: 2
Hii,
I have code in java 1.4 version there we got a new requirement like have decrypt a password from another webservice response, for that have to use AES 256 decryption, getting following exception:

SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");

java.security.NoSuchAlgorithmException: Algorithm PBKDF2WithHmacSHA1 not available
at javax.crypto.SunJCE_b.a(DashoA12275)
at javax.crypto.SecretKeyFactory.getInstance(DashoA12275)
at ftpserver.AESEncrypter.main(AESEncrypter.java:107)

I tried by copying jce_policy_1-4 version jars into java home security folder still am getting the above exception.
Is there any solution in Java 1.4 without changing to 1.5 because running jboss server version 3.2.3 will not support java 1.5.

Please help me
Phanikumar Balla
Greenhorn

Joined: Jul 27, 2013
Posts: 2
Decryption is working after adding http://www.bouncycastle.org/download/bcprov-jdk14-149.jar and http://www.bouncycastle.org/download/bcpkix-jdk14-149.jar dependency and
import org.bouncycastle.jce.provider.BouncyCastleProvider;
...
Security.addProvider(new BouncyCastleProvider());


http://www.bouncycastle.org/wiki/display/JA1/Provider+Installation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.security.NoSuchAlgorithmException: Algorithm PBKDF2WithHmacSHA1 not available