Package org.conscrypt
Class OpenSSLRSAKeyFactory
- java.lang.Object
-
- java.security.KeyFactorySpi
-
- org.conscrypt.OpenSSLRSAKeyFactory
-
public class OpenSSLRSAKeyFactory extends KeyFactorySpi
-
-
Constructor Summary
Constructors Constructor Description OpenSSLRSAKeyFactory()
-
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 <T extends KeySpec>
TengineGetKeySpec(Key key, Class<T> keySpec)Returns the key specification for the specified key.protected KeyengineTranslateKey(Key key)Translates the given key into a key from this key factory.
-
-
-
Method Detail
-
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.
-
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.
-
engineGetKeySpec
protected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) 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.keySpec- 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.
-
engineTranslateKey
protected Key engineTranslateKey(Key key) throws InvalidKeyException
Description copied from class:KeyFactorySpiTranslates the given key into a key from this key factory.- Specified by:
engineTranslateKeyin classKeyFactorySpi- Parameters:
key- the key to translate.- Returns:
- the translated key.
- Throws:
InvalidKeyException- if the specified key can not be translated by this key factory.
-
-