Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » NoSuchAlgorithmException for HmacSHA1(Can't find com.sun.crypto.provider.SunJCE)
NoSuchAlgorithmException for HmacSHA1 [message #857784] Thu, 26 April 2012 21:34
andrew thomson is currently offline andrew thomsonFriend
Messages: 1
Registered: April 2012
Junior Member
Hi all,

I've just downloaded Eclipse and written my first program to test some Web Services.
As part of this I need to generate a secret key using the HmacSHA1 algorithm, but

Mac mac = Mac.getInstance("HmacSHA1");


throws a NoSuchAlgorithmException for me. I 've googled a bit and tried adding

java.security.Security.addProvider(new com.sun.crypto.provider.SunJCE());


, as well as deleting and re-adding JRE System library from my project build path to no avail. Simply adding

import com.sun.crypto.provider.SunJCE;


to my class doesn't help either. Everything I've read suggests that this provider should be available by default, so what am I doing wrong? Can anyone tell me how to make it available to my class bearing in mind I've only been dipping my toe in the java world for a day and I am still pretty shaky about importing packages/programs?

Many thanks in advance for any assistance...
Previous Topic:Deactivation of export functions in birt viewer
Next Topic:User eclipse.ini in shared RAD-Citrix environment
Goto Forum:
  


Current Time: Tue Sep 24 15:36:17 GMT 2024

Powered by FUDForum. Page generated in 0.07554 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top