Re: SecretKeys and KeyStore

Jan Luehe (luehe@laguna.eng.sun.com)
Thu, 29 Oct 1998 13:30:29 -0800 (PST)

Morten:

> Looking at the APIs for JCA and JCE, I wonder how SecretKey instances
> are stored in the KeyStore. Is it at all possible? (besides rewriting
> the KeyStore class, of course!). The setKeyEntry() can only handle
> private keys, right? If so, can a SecretKey somehow be converted to a
> PrivateKey and then saved in the KeyStore?

Are you looking at the latest APIs?
We replaced "PrivateKey" with "Key" in setKeyEntry(), to
support storage of any key type (including secret keys)
in a keystore.

Jan