[Jsdsi-users] KeyPair
Status: Pre-Alpha
Brought to you by:
sajma
From: <mar...@or...> - 2004-08-11 18:16:17
|
Hi I will save and load a KeyPair, but i can't it. I trying with this: KeyPair gk = jsdsi.util.KeyPairFactory.create("RSA",2048); FileOutputStream fos = new FileOutputStream("gk.pub"); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(gk.toString()); oos.close(); How can't I load this object and retype in a KeyPair? This code don't work: KeyPair gk; FileInputStream fos = new FileInputStream("gk.pub"); ObjectInputStream oos = new ObjectInputStream(fos); gk = (KeyPair) oos.readObject(); oos.close(); Thanx. Marek Lany |