This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Security and the fly likes MD5 encryption and decryption Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "MD5 encryption and decryption" Watch "MD5 encryption and decryption" New topic

MD5 encryption and decryption

venugopal velvadapu

Joined: Nov 26, 2004
Posts: 1
i am using JavaTM Cryptography Extension 1.2.2

i am unable to generate key for HmacMD5

my code is :

key = KeyGenerator.getInstance("HmacMD5").generateKey();

error is :

Exception in thread "main" Cannot find any provider supporting HmacMD5
at javax.crypto.Cipher.getInstance(DashoA6275)
at Sample.DataEncrypter.setUp(
at Sample.DataEncrypter.main(

help me please ..............
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Apparently you don't have such an implementation available in your classpath.

Try this tip from the Java Developer's Almanac to print out all message digest algorithms available in your classpath. If you need some specific algorithm that's missing, try and see if BouncyCastle has it.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
It is sorta covered in the JavaRanch Style Guide.
subject: MD5 encryption and decryption