PBEWithMD5AndDes java.security.nosuchalgorithmexception

I'm getting a nosuchalgorithmexception when I try to run a program with PBEWithMD5andDES. This is the line thats causing the problem.

SecretKeyFactory skf = SecretKeyFactory.getInstance(algorithm);
     
algorithm is a string="PBEWithMD5AndDes"

My classpath is set ok because when I use other programs implementing DES they are ok.

Any suggestions?
 
JavaStarterAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
JavaStarterAuthor Commented:
Thanks girionis, I found the solution.

SecretKeyFactory skf = SecretKeyFactory.getInstance(algorithm);
   

The string algorithm should be "PBE" and not "PBEWithMD5AndDes".




0
All Courses

From novice to tech pro — start learning today.