public class KeyFactorySpi extends BaseKeyFactorySpi implements AsymmetricKeyInfoConverter
| Modifier and Type | Class and Description |
|---|---|
static class |
KeyFactorySpi.EC |
static class |
KeyFactorySpi.ECDH |
static class |
KeyFactorySpi.ECDHC |
static class |
KeyFactorySpi.ECDSA |
static class |
KeyFactorySpi.ECMQV |
| 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 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 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 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
generatePrivate in interface AsymmetricKeyInfoConverterIOExceptionpublic PublicKey generatePublic(SubjectPublicKeyInfo keyInfo) throws IOException
generatePublic in interface AsymmetricKeyInfoConverterIOException