Re: [Jsdsi-users] Exception while creating new KeyPair
Status: Pre-Alpha
Brought to you by:
sajma
From: Somaya A. <som...@ya...> - 2005-11-02 10:02:02
|
Hi Sameer, This is weird, as most of the test cases classes use this way to create KeyPairs. What is the difference between those 2 keyPair Objects signer1 and signer2: KeyPair signer1=jsdsi.RSAPublicKey.create(); KeyPair signer2 = KeyPairFactory.create(KeyEnum.RSA); I have two other questions: 1- Is there any other ways to create KeyPair Objects?? 2- How could I test whether two keys are identical or not? Shall I use the equal method or it is not overridden to test on the value rather than the reference? .. Same question for signatures? Thanks, Somaya --- Sameer Ajmani <aj...@gm...> wrote: > Sean, can you answer this? Looks like you wrote > this code. > > This like is somewhat suspect: > 153 kpg = > KeyPairGenerator.getInstance("SPKI/" + > keyEnum.jdkName()) > > There's no KeyPairGenerator registered as > "SPKI/RSA". If you remove > the "SPKI/", this should work (I think the Java RSA > library is simply > "RSA"), but this is just a hack for now. Hopefully > Sean has an idea > of how this was supposed to work :) > > S > > On 11/1/05, Somaya Aboulwafa > <som...@ya...> wrote: > > Hi, > > I am trying to create a new keypair as follows: > > > > KeyPair signer = > KeyPairFactory.create(KeyEnum.RSA); > > > > but I got the following Runtime Exception: > > > > jsdsi.JsdsiRuntimeException: > > java.security.NoSuchAlgorithmException: SPKI/RSA > > KeyPairGenerator not available > > at > > > jsdsi.util.KeyPairFactory.createKeyPairGenerator(KeyPairFactory.java:155) > > at > > > jsdsi.util.KeyPairFactory.getKeyPairGenerator(KeyPairFactory.java:120) > > at > > > jsdsi.util.KeyPairFactory.create(KeyPairFactory.java:102) > > at > > > jsdsi.util.KeyPairFactory.create(KeyPairFactory.java:59) > > > > So any idea about why is this happening and how to > > overcome this? > > > > Thanks, > > Somaya > > > > > > > > __________________________________ > > Start your day with Yahoo! - Make it your home > page! > > http://www.yahoo.com/r/hs > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by the JBoss Inc. > > Get Certified Today * Register for a JBoss > Training Course > > Free Certification Exam for All Training Attendees > Through End of 2005 > > Visit http://www.jboss.com/services/certification > for more information > > _______________________________________________ > > Jsdsi-users mailing list > > Jsd...@li... > > > https://lists.sourceforge.net/lists/listinfo/jsdsi-users > > > > > > > -- > Sameer > http://ajmani.net > __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com |