This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoSuchAlgorithm for KeyGenerator.getInstance("HmacMD5")

 
Jeff Breeden
Greenhorn
Posts: 2
  • 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
Posts: 1166
17
Java Linux Netbeans IDE
  • 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
  • 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