aspose file tools*
The moose likes JSP and the fly likes java.security.NoSuchAlgorithmException: MessageDigest HMAC-SHA-1 implementation not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "java.security.NoSuchAlgorithmException: MessageDigest HMAC-SHA-1 implementation not found" Watch "java.security.NoSuchAlgorithmException: MessageDigest HMAC-SHA-1 implementation not found" New topic
Author

java.security.NoSuchAlgorithmException: MessageDigest HMAC-SHA-1 implementation not found

Ashish Kirpan
Greenhorn

Joined: Jan 24, 2011
Posts: 22

I am using ibm jdk1.4, while hashing i stuck here
java.security.NoSuchAlgorithmException: MessageDigest HMAC-SHA-1 implementation not found
i am sharing sample code, please help if anyone having any idea about this.

MessageDigest hmac_sha1 = MessageDigest.getInstance("HMAC-SHA-1", "CryptixCrypto");
sha1key = Hex.fromString(astrKey);
tmp = hmac_sha1.digest(astrData.getBytes());
output = Hex.toString(tmp);
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
While there may be a solution to the problem, note that both Cryptix and Java 1.4 are dead. I'd advise to upgrade to Java 6 which comes with all the strong crypto support you need.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.security.NoSuchAlgorithmException: MessageDigest HMAC-SHA-1 implementation not found