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...