Re: [Jsdsi-users] Exception while creating new KeyPair
Status: Pre-Alpha
Brought to you by:
sajma
From: Sameer A. <aj...@gm...> - 2005-11-02 14:30:53
|
On 11/2/05, Somaya Aboulwafa <som...@ya...> wrote: > Hi Sameer, > > This is weird, as most of the test cases classes use > this way to create KeyPairs. Ahhh -- I bet the problem is that you have not installed the Jsdsi Provider. Try calling jsdsi.Provider.install() in your main. > > What is the difference between those 2 keyPair Objects > signer1 and signer2: > KeyPair signer1=3Djsdsi.RSAPublicKey.create(); > KeyPair signer2 =3D 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? I'm really not sure -- I did not write these classes and am not familiar with them. Sean could answer these, but till then, reading the code is the best plan :) That said, Signature does indeed override equals() to compare-by-value. Note sure about KeyPair; perhaps just read the code for equals(). S > > 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 =3D > > 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 =3D > > 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 > -- Sameer http://ajmani.net |