Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

want to use sha-1 with sun jre v1.5 and ibm jre v1.5

 
sharat dorepally
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At present we are using SHA1 ( Secure Hash Algorithm ) for Message digest and JDK Version 1.4.1. But we get one new requirement for Message Digest that we need it work on Sun jre 1.5 and Webshpere Applcation Server 6.1 32 bit which is using ibm jre 1.5 .

we call the Message Digest Class which is in rt.jar by passing the required parameter like,

current one :

MessageDigest digest = MessageDigest.getInstance("SHA-1");

which is working fine.

But it is throwing exception when usin sun jre 1.5 or ibm jre 1.5.
but it throw the exception like,
Error creating digest object: no such algorithm: SHA-1 for provider Cryptix

at the getInstance() method.
Could you please suggest some idea or procedure or any step we need to follow for this.
 
Henry Wong
author
Marshal
Pie
Posts: 21409
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works fine for me... using Sun JRE 1.5.0_6.

Henry
 
greg stark
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like somehow you have made Cryptix your default provider, probably a bad idea. Make the Sun provider the default, or ask for the Sun provider in the getInstance() call, using the MessageDigest.getInstance(String, String) method
[ January 05, 2007: Message edited by: greg stark ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic