File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoSuchAlgorithm for KeyGenerator.getInstance("HmacMD5")

 
Jeff Breeden
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a Spring MVC web app, I'm getting a NoSuchAlgorithmException from both Eclipse and Maven on



The javax.crypto packages are imported (the KeyGenerator object is recognized) so if I'm reading correctly, it is not finding MD5 in any available provider.
In the project properties it has jce.jar in the build path in the jre6\lib folder. Is there any other file or path I should check? Do I need something in my project folder?

 
Richard Tookey
Bartender
Pie
Posts: 1166
17
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HmacMD5 works for me in 1.7 and has worked in all SunJCE providers I can remember for the last 10 years or so. Are you sure the NoSuchAlgorithmException is coming from that line?

The program I use for checking which provider provides which algorithms is -
 
Jeff Breeden
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was mis-reading it. I needed "throws NoSuchAlgorithmException" on the method definition. Thank you for the response.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic