From: ikiliklip i. <iki...@ya...> - 2007-08-27 07:42:22
|
Hi everyvody! I'm trying to read the content of bob-public.pgp.asc file. Well, the code where the error is thrown is that: in = new FileInputStream("bob-public.pgp.asc"); msgs = mf.generateMessages(in); kbm = (KeyBundleMessage) msgs.iterator().next(); publicBundle = (PGPKeyBundle) kbm.getKeyBundle(); in.close(); When the content of this file is a key generated by crytix, it works. But when I put in the file a simple string "This is my public key" as a key, the error I get is: java.lang.ClassCastException: cryptix.openpgp.provider.PGPLiteralMessageImpl Do you know why? If I convert the string to base64, i get the same error. I'm doing something wrong, but I don't know what it is!! Help me, please!!! I would appreciate any hint! Thanks, Regards --------------------------------- Sé un Mejor Amante del Cine ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!. |