public class KeyFactorySpi1_2
extends java.security.KeyFactorySpi
Constructor and Description |
---|
KeyFactorySpi1_2() |
Modifier and Type | Method and Description |
---|---|
protected java.security.PrivateKey |
engineGeneratePrivate(java.security.spec.KeySpec keySpec)
We don't support RSAPrivateKeySpec because it doesn't have enough
information.
|
protected java.security.PublicKey |
engineGeneratePublic(java.security.spec.KeySpec keySpec) |
protected <T extends java.security.spec.KeySpec> |
engineGetKeySpec(java.security.Key key,
java.lang.Class<T> keySpec) |
protected java.security.Key |
engineTranslateKey(java.security.Key key)
Translates key by calling getEncoded() to get its encoded form,
then importing the key from its encoding.
|
protected java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
engineGeneratePublic
in class java.security.KeyFactorySpi
java.security.spec.InvalidKeySpecException
protected java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
engineGeneratePrivate
in class java.security.KeyFactorySpi
java.security.spec.InvalidKeySpecException
protected <T extends java.security.spec.KeySpec> T engineGetKeySpec(java.security.Key key, java.lang.Class<T> keySpec) throws java.security.spec.InvalidKeySpecException
engineGetKeySpec
in class java.security.KeyFactorySpi
java.security.spec.InvalidKeySpecException
protected java.security.Key engineTranslateKey(java.security.Key key) throws java.security.InvalidKeyException
This method is not well standardized: the documentation is very vague about how the key is supposed to be translated. It is better to move keys around by wrapping and unwrapping them; or by manually translating to a KeySpec, then manually translating back to a Key.
engineTranslateKey
in class java.security.KeyFactorySpi
java.security.InvalidKeyException