[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] How to load a PrivateKey as byte[]



Hi,

I have save a PrivateKey by using the method Key.getEncoded().
I try to load it using the PKCS8EncodedKeySpec, but an InvalidKeySpecificationException is thrown.

What is the regular way to write a PrivateKey to an file (as byte[]) and load it back. (It should be algorithm-independent and provider-independent).

Thanks for your help!

Best regards,
Thomas Kuhlmann

----
Bertelsmann mediaSystems
An der Autobahn
D-33311 Guetersloh
Germany
--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-jce