Re: [Jsdsi-users] Exception while creating new KeyPair
Status: Pre-Alpha
Brought to you by:
sajma
From: Somaya A. <som...@ya...> - 2005-11-03 18:56:32
|
Thanks. But what does jsdsi.Provider.install() actually do ? Sameer Ajmani <aj...@gm...> wrote: On 11/2/05, Somaya Aboulwafa 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=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? 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 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 > > 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 > -- Sameer http://ajmani.net ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Jsdsi-users mailing list Jsd...@li... https://lists.sourceforge.net/lists/listinfo/jsdsi-users "æóáóäóÈúáõæóäøóßõãú ÈöÔóíúÁò ãøöäó ÇáúÎóæÝú æóÇáúÌõæÚö æóäóÞúÕò ãøöäó ÇáÃóãóæóÇáö æóÇáÃäÝõÓö æóÇáËøóãóÑóÇÊö æóÈóÔøöÑö ÇáÕøóÇÈöÑöíä ÇáøóÐöíäó ÅöÐóÇ ÃóÕóÇÈóÊúåõã ãøõÕöíÈóÉñ ÞóÇáõæÇú ÅöäøóÇ áöáøåö æóÅöäøóÜÇ Åöáóíúåö ÑóÇÌöÚæäó ÃõæáóÜÆößó Úóáóíúåöãú ÕóáóæóÇÊñ ãøöä ÑøóÈøöåöãú æóÑóÍúãóÉñ æóÃõæáóÜÆößó åõãõ ÇáúãõåúÊóÏõæä" ÇáÈÞÑÉ 155- 157 --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. |