From: rinberg\@libero\.it <ri...@li...> - 2007-08-27 17:11:20
|
Hi. I have to send to a remote peer the public part of a key created loca= lly. I managed to extract the byte array with the following code: byte[] p_k =3D key.getPubKey().asByteArray(); try { System.out.println("PubAIK size: "+p_k.length); FileOutputStream file_pk =3D new FileOutputStream("aik_pubkey"); file_pk.write(p_k, 0, p_k.length); file_pk.flush(); } And then I'm sending th byte array via a socket to the remote peer togeth= er with the encrypted data. Then I should decrypt the data when I have re= ceived it on the remote peer, how could I do it? Any help would be appreciated. Thank you. Best Regards, Rinaldo Bergamini |