java.security
public abstract class KeyFactorySpi extends Object
Since: JDK 1.2
Constructor Summary | |
---|---|
KeyFactorySpi()
Constucts a new KeyFactorySpi. |
Method Summary | |
---|---|
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> T | 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.
|
Parameters: keySpec key specification
Returns: the private key
Throws: InvalidKeySpecException invalid key specification for this key factory to produce a private key
Parameters: keySpec key specification
Returns: the public key
Throws: InvalidKeySpecException invalid key specification for this key factory to produce a public key
Parameters: key the key keySpec the specification class to return the key material in.
Returns: the key specification in an instance of the requested specification class
Throws: InvalidKeySpecException the requested key specification is inappropriate for this key or the key is unrecognized.
Parameters: key key from an unknown or untrusted provider
Returns: the translated key
Throws: InvalidKeyException if the key cannot be processed by this key factory