Class KeyFactorySpi
- java.lang.Object
-
- java.security.KeyFactorySpi
-
- org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi
-
- org.bouncycastle.jcajce.provider.asymmetric.edec.KeyFactorySpi
-
- All Implemented Interfaces:
AsymmetricKeyInfoConverter
- Direct Known Subclasses:
KeyFactorySpi.Ed25519
,KeyFactorySpi.Ed448
,KeyFactorySpi.EdDSA
,KeyFactorySpi.X25519
,KeyFactorySpi.X448
,KeyFactorySpi.XDH
public class KeyFactorySpi extends BaseKeyFactorySpi implements AsymmetricKeyInfoConverter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KeyFactorySpi.Ed25519
static class
KeyFactorySpi.Ed448
static class
KeyFactorySpi.EdDSA
static class
KeyFactorySpi.X25519
static class
KeyFactorySpi.X448
static class
KeyFactorySpi.XDH
-
Constructor Summary
Constructors Constructor Description KeyFactorySpi(String algorithm, boolean isXdh, int specificBase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PrivateKey
engineGeneratePrivate(KeySpec keySpec)
protected PublicKey
engineGeneratePublic(KeySpec keySpec)
protected KeySpec
engineGetKeySpec(Key key, Class spec)
protected Key
engineTranslateKey(Key key)
PrivateKey
generatePrivate(PrivateKeyInfo keyInfo)
PublicKey
generatePublic(SubjectPublicKeyInfo keyInfo)
-
-
-
Constructor Detail
-
KeyFactorySpi
public KeyFactorySpi(String algorithm, boolean isXdh, int specificBase)
-
-
Method Detail
-
engineTranslateKey
protected Key engineTranslateKey(Key key) throws InvalidKeyException
- Specified by:
engineTranslateKey
in classKeyFactorySpi
- Throws:
InvalidKeyException
-
engineGetKeySpec
protected KeySpec engineGetKeySpec(Key key, Class spec) throws InvalidKeySpecException
- Overrides:
engineGetKeySpec
in classBaseKeyFactorySpi
- Throws:
InvalidKeySpecException
-
engineGeneratePrivate
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
- Overrides:
engineGeneratePrivate
in classBaseKeyFactorySpi
- Throws:
InvalidKeySpecException
-
engineGeneratePublic
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
- Overrides:
engineGeneratePublic
in classBaseKeyFactorySpi
- Throws:
InvalidKeySpecException
-
generatePrivate
public PrivateKey generatePrivate(PrivateKeyInfo keyInfo) throws IOException
- Specified by:
generatePrivate
in interfaceAsymmetricKeyInfoConverter
- Throws:
IOException
-
generatePublic
public PublicKey generatePublic(SubjectPublicKeyInfo keyInfo) throws IOException
- Specified by:
generatePublic
in interfaceAsymmetricKeyInfoConverter
- Throws:
IOException
-
-