aspose file tools*
The moose likes Security and the fly likes want to use sha-1 with sun jre v1.5 and ibm jre v1.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "want to use sha-1 with sun jre v1.5 and ibm jre v1.5" Watch "want to use sha-1 with sun jre v1.5 and ibm jre v1.5" New topic
Author

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

sharat dorepally
Greenhorn

Joined: Jan 03, 2007
Posts: 1
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
Sheriff

Joined: Sep 28, 2004
Posts: 18896
    
  40

Works fine for me... using Sun JRE 1.5.0_6.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
greg stark
Ranch Hand

Joined: Aug 10, 2006
Posts: 220
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 ]

Nice to meet you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: want to use sha-1 with sun jre v1.5 and ibm jre v1.5