Java KeyStore setEntry() using an AES SecretKey

前端 未结 1 1378
太阳男子
太阳男子 2020-12-19 22:14

I\'m currently working on an key-handling class in Java, specifically using a KeyStore. I\'m trying to generate a SecretKey with an AES instance, then place it inside of the

相关标签:
1条回答
  • 2020-12-19 22:48

    I found this as a non-accepted answer on stackoverflow:

    The "Cannot store non-PrivateKeys" error message usually indicates you are trying to use secret symmetric keys with a JKS keystore type. The JKS keystore type only supports asymmetric (public/private) keys. You would have to create a new keystore of type JCEKS to support secret keys.

    It is very hard to confirm this, although my memory tells me it is correct.

    0 讨论(0)
提交回复
热议问题