Click here to Skip to main content
15,919,613 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying an encryption-decryption code in java. When I am trying to run it with JDK1.0.07 and code in class with main method it is running fine. But when I am trying to run same code inside a James mailet in James mail server following error is thrown.

java.security.NoSuchAlgorithmException: Algorithm HmacSHA256 not available.

Can anybody guide me to proper direction please?

Thank you.
Posted
Comments
TorstenH. 4-May-12 8:55am    
Reason for my vote of 1
no own resource

1 solution

Copy sunjce_provider.jar from $JAVA_HOME/jre/lib/ext to the lib directory of the container.

Adding the following line to my code:

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900