public class DSAKeyFactoryImpl extends KeyFactorySpi
Constructor and Description |
---|
DSAKeyFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
protected PrivateKey |
engineGeneratePrivate(KeySpec keySpec)
This method generates a DSAPrivateKey object from the provided key specification.
|
protected PublicKey |
engineGeneratePublic(KeySpec keySpec)
This method generates a DSAPublicKey object from the provided key specification.
|
protected <T extends KeySpec> |
engineGetKeySpec(Key key,
Class<T> keySpec)
This method returns a specification for the supplied key.
|
protected Key |
engineTranslateKey(Key key)
The method generates a DSAPublicKey object from the provided key.
|
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
engineGeneratePrivate
in class KeyFactorySpi
keySpec
- - the specification (key material) for the DSAPrivateKey.InvalidKeySpecException
- if "keySpec" is neither DSAPrivateKeySpec nor PKCS8EncodedKeySpecprotected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
engineGeneratePublic
in class KeyFactorySpi
keySpec
- - the specification (key material) for the DSAPublicKey.InvalidKeySpecException
- if "keySpec" is neither DSAPublicKeySpec nor X509EncodedKeySpecprotected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) throws InvalidKeySpecException
engineGetKeySpec
in class KeyFactorySpi
key
- -
either DSAPrivateKey or DSAPublicKeykeySpec
- -
either DSAPrivateKeySpec.class or DSAPublicKeySpec.classInvalidKeySpecException
- if "keySpec" is not a specification for DSAPublicKey or
DSAPrivateKeyprotected Key engineTranslateKey(Key key) throws InvalidKeyException
engineTranslateKey
in class KeyFactorySpi
key
- - a DSAPublicKey object or DSAPrivateKey object.InvalidKeyException
- if "key" is neither DSAPublicKey nor DSAPrivateKey