public class KeyFactorySpi extends BaseKeyFactorySpi
| Constructor and Description |
|---|
KeyFactorySpi() |
| Modifier and Type | Method and Description |
|---|---|
protected PrivateKey |
engineGeneratePrivate(KeySpec keySpec)
Generates a instance of
PrivateKey from the given key
specification. |
protected PublicKey |
engineGeneratePublic(KeySpec keySpec)
Generates a instance of
PublicKey from the given key
specification. |
protected KeySpec |
engineGetKeySpec(Key key,
Class spec)
Returns the key specification for the specified key.
|
protected Key |
engineTranslateKey(Key key)
Translates the given key into a key from this key factory.
|
PrivateKey |
generatePrivate(PrivateKeyInfo keyInfo) |
PublicKey |
generatePublic(SubjectPublicKeyInfo keyInfo) |
protected KeySpec engineGetKeySpec(Key key, Class spec) throws InvalidKeySpecException
KeyFactorySpiengineGetKeySpec in class BaseKeyFactorySpikey - the key from which the specification is requested.spec - the type of the requested KeySpec.InvalidKeySpecException - if the key can not be processed, or the requested requested
KeySpec is inappropriate for the given key.protected Key engineTranslateKey(Key key) throws InvalidKeyException
KeyFactorySpiengineTranslateKey in class KeyFactorySpikey - the key to translate.InvalidKeyException - if the specified key can not be translated by this key
factory.protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
KeyFactorySpiPrivateKey from the given key
specification.engineGeneratePrivate in class BaseKeyFactorySpikeySpec - the specification of the private key.InvalidKeySpecException - if the specified keySpec is invalid.protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
KeyFactorySpiPublicKey from the given key
specification.engineGeneratePublic in class BaseKeyFactorySpikeySpec - the specification of the public key.InvalidKeySpecException - if the specified keySpec is invalid.public PrivateKey generatePrivate(PrivateKeyInfo keyInfo) throws IOException
IOExceptionpublic PublicKey generatePublic(SubjectPublicKeyInfo keyInfo) throws IOException
IOException