• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.security.NoSuchAlgorithmException: Algorithm PBKDF2WithHmacSHA1 not available

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
To avoid criticism do nothing, say nothing, be nothing. -Elbert Hubbard. Please critique this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic