public abstract class KeyFactorySpi extends Object
Constructor and Description |
---|
KeyFactorySpi()
Constucts a new KeyFactorySpi.
|
Modifier and Type | Method and Description |
---|---|
protected abstract PrivateKey |
engineGeneratePrivate(KeySpec keySpec)
Generates a private key from the provided key specification.
|
protected abstract PublicKey |
engineGeneratePublic(KeySpec keySpec)
Generates a public key from the provided key specification.
|
protected abstract <T extends KeySpec> |
engineGetKeySpec(Key key,
Class<T> keySpec)
Returns a key specification for the given key. keySpec
identifies the specification class to return the key
material in.
|
protected abstract Key |
engineTranslateKey(Key key)
Translates the key from an unknown or untrusted provider
into a key for this key factory.
|
public KeyFactorySpi()
protected abstract PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
keySpec
- key specificationInvalidKeySpecException
- invalid key specification for
this key factory to produce a public keyprotected abstract PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
keySpec
- key specificationInvalidKeySpecException
- invalid key specification for
this key factory to produce a private keyprotected abstract <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) throws InvalidKeySpecException
key
- the keykeySpec
- the specification class to return the
key material in.InvalidKeySpecException
- the requested key specification
is inappropriate for this key or the key is
unrecognized.protected abstract Key engineTranslateKey(Key key) throws InvalidKeyException
key
- key from an unknown or untrusted providerInvalidKeyException
- if the key cannot be
processed by this key factory