Class BaseKeyFactorySpi
java.lang.Object
java.security.KeyFactorySpi
org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi
- All Implemented Interfaces:
AsymmetricKeyInfoConverter
- Direct Known Subclasses:
KeyFactorySpi,KeyFactorySpi,KeyFactorySpi,KeyFactorySpi
public abstract class BaseKeyFactorySpi extends KeyFactorySpi implements AsymmetricKeyInfoConverter
-
Constructor Summary
Constructors Constructor Description BaseKeyFactorySpi() -
Method Summary
Modifier and Type Method Description protected PrivateKeyengineGeneratePrivate(KeySpec keySpec)Generates a instance ofPrivateKeyfrom the given key specification.protected PublicKeyengineGeneratePublic(KeySpec keySpec)Generates a instance ofPublicKeyfrom the given key specification.protected KeySpecengineGetKeySpec(Key key, Class spec)Returns the key specification for the specified key.Methods inherited from class java.security.KeyFactorySpi
engineTranslateKeyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter
generatePrivate, generatePublic
-
Constructor Details
-
BaseKeyFactorySpi
public BaseKeyFactorySpi()
-
-
Method Details
-
engineGeneratePrivate
Description copied from class:KeyFactorySpiGenerates a instance ofPrivateKeyfrom the given key specification.- Specified by:
engineGeneratePrivatein classKeyFactorySpi- Parameters:
keySpec- the specification of the private key.- Returns:
- the private key.
- Throws:
InvalidKeySpecException- if the specifiedkeySpecis invalid.
-
engineGeneratePublic
Description copied from class:KeyFactorySpiGenerates a instance ofPublicKeyfrom the given key specification.- Specified by:
engineGeneratePublicin classKeyFactorySpi- Parameters:
keySpec- the specification of the public key.- Returns:
- the public key.
- Throws:
InvalidKeySpecException- if the specifiedkeySpecis invalid.
-
engineGetKeySpec
Description copied from class:KeyFactorySpiReturns the key specification for the specified key.- Specified by:
engineGetKeySpecin classKeyFactorySpi- Parameters:
key- the key from which the specification is requested.spec- the type of the requestedKeySpec.- Returns:
- the key specification for the specified key.
- Throws:
InvalidKeySpecException- if the key can not be processed, or the requested requestedKeySpecis inappropriate for the given key.
-