-
Enhancement
-
Resolution: Duplicate
-
P5
-
None
-
None
-
generic
-
generic
The PKCS8EncodedKeySpec class completely obscures the underlying key information forcing applications to "know" what type of key is buried within. This is incongruent relative to the information accessible by the EncryptedPrivateKeyInfo class. That is to say that the EncryptedPrivateKeyInfo class supplies sufficent interface to get back the PKCS8EncodedKeySpec but there is no convenient way to take that key spec and have a KeyFactory mill the PrivateKey. The programming metaphor that should be supported is something along the lines of;
PKCS8EncodedKeySpec pkcs8Spec ...
KeyFactory kf = KeyFactory.getInstance(pkcs8Spec.getAlgorithm());
PrivateKey pk = kf.generatePrivate(pkcs8spec);
PKCS8EncodedKeySpec pkcs8Spec ...
KeyFactory kf = KeyFactory.getInstance(pkcs8Spec.getAlgorithm());
PrivateKey pk = kf.generatePrivate(pkcs8spec);
- duplicates
-
JDK-8047223 Add algorithm parameter to EncodedKeySpec class and its two subclasses
- Closed
- links to
-
Review openjdk/jdk/10131