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

Re: [iaik-jce] decrypt() and getPrivateKeyInfo() actually return a PrivateKey ??



Before Snapshot 2.04, these methods actually have returned a PrivateKeyInfo.
This has been changed to PrivateKey in order to be compatible to private
keys from other providers, but unfortunately the documentation has not been
updated. We will correct this. Thank you.

Dieter Bratko
-----Ursprüngliche Nachricht-----
Von: Sundar Krishnan <sundark@india.hp.com>
An: <iaik-ssl@iaik.tu-graz.ac.at>; <iaik-jce@iaik.tu-graz.ac.at>
Gesendet: Donnerstag, 03. Juni 1999 01:22
Betreff: [iaik-jce] decrypt() and getPrivateKeyInfo() actually return a
PrivateKey ??


> The documentation on class EncryptedPrivateKeyInfo says that the methods
> :
> decrypt() and getPrivateKeyInfo() return a PrivateKeyInfo.
>
> However, I have observed that they actually return a PrivateKey, not a
> PrivateKeyInfo.
> You need an additional casting to PrivateKeyInfo if you need one. See eg
> below.
>
> PrivateKeyInfo prKeyInfo1 = (PrivateKeyInfo)epki.decrypt("This is the
> passphrase!");
>
> PrivateKeyInfo prKeyInfo2 = (PrivateKeyInfo)epki.getPrivateKeyInfo();
>
> class iaik.pkcs.pkcs8.PrivateKeyInfo implements
>     iaik.asn1.ASN1Type,
>     java.security.PrivateKey,
>     java.io.Serializable
>
>
> If the intention is to actually return a PrivateKeyInfo object, I think
> the code
> needs to be corrected. Pl comment/correct if I am wrong.
>
> Rgds
>
> Sundar Krishnan
>
>
>
>
> --
> Mailinglist-archive at
http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-jce/maillist.html
>
> To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the
folowing content: UNSUBSCRIBE iaik-jce
>
>
>


smime.p7s