Class RSAKeyFactory
- java.lang.Object
-
- java.security.KeyFactorySpi
-
- com.fortanix.sdkms.jce.provider.keys.asym.rsa.RSAKeyFactory
-
public class RSAKeyFactory extends KeyFactorySpi
KeyFactory for RSA keys. Keys must be instances of PublicKey or PrivateKey and getAlgorithm() must return "RSA". For such keys, it supports conversion between the following: For public keys: . PublicKey with an X.509 encoding . RSAPublicKey . RSAPublicKeySpec . X509EncodedKeySpec For private keys: . RSAPrivateKey . RSAPrivateKeySpec . PKCS8EncodedKeySpec (of course, CRT variants only for CRT keys)
-
-
Constructor Summary
Constructors Constructor Description RSAKeyFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PrivateKey
engineGeneratePrivate(KeySpec keySpec)
protected PublicKey
engineGeneratePublic(KeySpec keySpec)
protected <T extends KeySpec>
TengineGetKeySpec(Key key, Class<T> keySpec)
protected Key
engineTranslateKey(Key key)
-
-
-
Method Detail
-
engineGeneratePublic
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
- Specified by:
engineGeneratePublic
in classKeyFactorySpi
- Throws:
InvalidKeySpecException
-
engineGeneratePrivate
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
- Specified by:
engineGeneratePrivate
in classKeyFactorySpi
- Throws:
InvalidKeySpecException
-
engineGetKeySpec
protected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) throws InvalidKeySpecException
- Specified by:
engineGetKeySpec
in classKeyFactorySpi
- Throws:
InvalidKeySpecException
-
engineTranslateKey
protected Key engineTranslateKey(Key key) throws InvalidKeyException
- Specified by:
engineTranslateKey
in classKeyFactorySpi
- Throws:
InvalidKeyException
-
-