public class KeyFactory extends KeyFactorySpi
| Constructor and Description |
|---|
KeyFactory() |
| 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 keySpec)
Returns the key specification for the specified key.
|
protected Key |
engineTranslateKey(Key key)
Translates the given key into a key from this key factory.
|
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
KeyFactorySpiPrivateKey from the given key
specification.engineGeneratePrivate in class KeyFactorySpikeySpec - 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 KeyFactorySpikeySpec - the specification of the public key.InvalidKeySpecException - if the specified keySpec is invalid.protected KeySpec engineGetKeySpec(Key key, Class keySpec) throws InvalidKeySpecException
KeyFactorySpiengineGetKeySpec in class KeyFactorySpikey - the key from which the specification is requested.keySpec - 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.