Writing and retrieving RSA keys from a file

Hello all,

I'm trying to write a generated RSAPublicKey and RSAPrivateKey to a file, and then, later retrieve them.

I thought I could use ObjectInput/OutputStream to do that, but when I do so I get the exception java.io.NotSerializableException: java.io.ObjectOutputStream

(I'm surprised, because RSAPublic/PrivateKey are serializable, aren't they ?).

If this is not the way to do it, I do not know how (no key constructor reading from byte [] ...).

Can somebody please help me ?

Thanks,

Axelle.

[554 byte] By [axelleA] at [2007-9-26 2:44:57]
# 1
Sorry, I don't know what happened, but it works now.(can't see what I have changed though).Axelle.
axelleA at 2007-6-29 10:25:59 > top of Java-index,Security,Other Security APIs, Tools, and Issues...
# 2
Hi,Can we generate public and private keys from fingerprint?where can i find a piece of code to view how it is.Thanks,Ganesh
Ganesh553 at 2007-6-29 10:25:59 > top of Java-index,Security,Other Security APIs, Tools, and Issues...