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 PrivateKeyengineGeneratePrivate(KeySpec keySpec)protected PublicKeyengineGeneratePublic(KeySpec keySpec)protected <T extends KeySpec>
TengineGetKeySpec(Key key, Class<T> keySpec)protected KeyengineTranslateKey(Key key)
-
-
-
Method Detail
-
engineGeneratePublic
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException
- Specified by:
engineGeneratePublicin classKeyFactorySpi- Throws:
InvalidKeySpecException
-
engineGeneratePrivate
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException
- Specified by:
engineGeneratePrivatein classKeyFactorySpi- Throws:
InvalidKeySpecException
-
engineGetKeySpec
protected <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) throws InvalidKeySpecException
- Specified by:
engineGetKeySpecin classKeyFactorySpi- Throws:
InvalidKeySpecException
-
engineTranslateKey
protected Key engineTranslateKey(Key key) throws InvalidKeyException
- Specified by:
engineTranslateKeyin classKeyFactorySpi- Throws:
InvalidKeyException
-
-