• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Playing with KeyPair

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have java.security.KeyPairGenerator making RSA KeyPairs for me, but I'm not sure what to do with the encoded data. On my public and private keys I call the getEncoded() method, which returns a binary representation of the key, but how can I turn the binary representation back into a key object? I've been poking around the documentation for about a day without any luck.

Thanks,
Mike

Edit: More generally, if someone knows of a tutorial about working with KeyPairs in java other than the sun standard ones, it would be appreciated. Figuring stuff out from google snippets and API docs isn't exactly fun.

[ November 14, 2005: Message edited by: M Litherland ]

Edit 2: I found an example of getting the key pair back from the encoding here: http://javaalmanac.com/egs/java.security/GetKeyPairBytes.html?l=rel
[ November 14, 2005: Message edited by: M Litherland ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used to translate .net key file to java key file.
You could learn a lot from this Example

 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic