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
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]
I agree. Here's the link:
subject: MD5 encryption and decryption
It's not a secret anymore!