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
All Methods Instance Methods Concrete Methods 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
engineTranslateKey
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter
generatePrivate, generatePublic
-
-
-
-
Method Detail
-
engineGeneratePrivate
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
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
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
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
protected KeySpec engineGetKeySpec(Key key, Class spec) throws InvalidKeySpecException
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.
-
-