Module io.github.mmm.crypto
Class AsymmetricKeyCreatorRsa
- java.lang.Object
- 
- io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithm
- 
- io.github.mmm.crypto.algorithm.AbstractCryptoAlgorithmWithProvider
- 
- io.github.mmm.crypto.algorithm.CryptoAlgorithmImpl
- 
- io.github.mmm.crypto.algorithm.CryptoAlgorithmImplWithRandom
- 
- io.github.mmm.crypto.asymmetric.key.AbstractAsymmetricKeyCreator<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa>
- 
- io.github.mmm.crypto.asymmetric.key.rsa.AsymmetricKeyCreatorRsa
 
 
 
 
 
 
- 
- All Implemented Interfaces:
- CryptoAlgorithm,- AsymmetricKeyCreator<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa>,- AsymmetricKeyPairFactory<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa>,- AsymmetricKeyPairFactorySimple<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa>,- PrivateKeyFactory<RSAPrivateKey>,- PublicKeyFactory<RSAPublicKey>,- KeyCreator
 
 public class AsymmetricKeyCreatorRsa extends AbstractAsymmetricKeyCreator<RSAPrivateKey,RSAPublicKey,AsymmetricKeyPairRsa> Implementation ofAsymmetricKeyCreatorforRSA.- Since:
- 1.0.0
 
- 
- 
Field Summary- 
Fields inherited from class io.github.mmm.crypto.algorithm.AbstractCryptoAlgorithmWithProviderprovider
 
- 
 - 
Constructor SummaryConstructors Constructor Description AsymmetricKeyCreatorRsa(int keyLength)The constructor.AsymmetricKeyCreatorRsa(int keyLength, SecurityProvider provider, RandomFactory randomFactory)The constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description AsymmetricKeyPairRsacreateKeyPair(RSAPrivateKey privateKey, RSAPublicKey publicKey)intgetKeyLength(RSAPrivateKey privateKey)intgetKeyLength(RSAPublicKey publicKey)- 
Methods inherited from class io.github.mmm.crypto.asymmetric.key.AbstractAsymmetricKeyCreatorasData, asData, asData, createKeyPair, createPrivateKey, createPublicKey, generateKeyPair, getKeyLength, init, register, register
 - 
Methods inherited from class io.github.mmm.crypto.algorithm.CryptoAlgorithmImplWithRandomcreateSecureRandom, getRandomFactory
 - 
Methods inherited from class io.github.mmm.crypto.algorithm.CryptoAlgorithmImplgetAlgorithm
 - 
Methods inherited from class io.github.mmm.crypto.algorithm.AbstractCryptoAlgorithmWithProvidergetProvider
 - 
Methods inherited from class io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithmcreationFailedException, creationFailedException, creationFailedException, creationFailedException, getAlgorithm, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface io.github.mmm.crypto.asymmetric.key.AsymmetricKeyCreatorasBinary, asBinary, asBinary, asData, asData, asData, createKeyPair, createPrivateKey, createPublicKey, verifyKey, verifyKey
 - 
Methods inherited from interface io.github.mmm.crypto.asymmetric.key.AsymmetricKeyPairFactoryasBinary
 - 
Methods inherited from interface io.github.mmm.crypto.algorithm.CryptoAlgorithmgetAlgorithm
 - 
Methods inherited from interface io.github.mmm.crypto.asymmetric.key.PrivateKeyFactoryasBinary
 - 
Methods inherited from interface io.github.mmm.crypto.asymmetric.key.PublicKeyFactoryasBinary
 
- 
 
- 
- 
- 
Constructor Detail- 
AsymmetricKeyCreatorRsapublic AsymmetricKeyCreatorRsa(int keyLength) The constructor.- Parameters:
- keyLength- the- key length.
 
 - 
AsymmetricKeyCreatorRsapublic AsymmetricKeyCreatorRsa(int keyLength, SecurityProvider provider, RandomFactory randomFactory)The constructor.- Parameters:
- keyLength- the- key length.
- provider- the- provider.
- randomFactory- the- random factory.
 
 
- 
 - 
Method Detail- 
createKeyPairpublic AsymmetricKeyPairRsa createKeyPair(RSAPrivateKey privateKey, RSAPublicKey publicKey) - Parameters:
- privateKey- the- PrivateKey.
- publicKey- the corresponding- PublicKey.
- Returns:
- the AsymmetricKeyPair.
 
 - 
getKeyLengthpublic int getKeyLength(RSAPrivateKey privateKey) - Parameters:
- privateKey- the- PrivateKey.
- Returns:
- the key lengthof the given key in bits.
 
 - 
getKeyLengthpublic int getKeyLength(RSAPublicKey publicKey) - Parameters:
- publicKey- the- PublicKey.
- Returns:
- the key lengthof the given key in bits.
 
 
- 
 
-