PR - type of PrivateKey.PU - type of PublicKey.PAIR - type of AsymmetricKeyPair.public class AsymmetricKeyCreatorImpl<PR extends PrivateKey,PU extends PublicKey,PAIR extends AbstractAsymmetricKeyPair<PR,PU>> extends AbstractAsymmetricKeyCreator<PR,PU,PAIR>
KeyCreator. If available you should prefer implementations for specific
algorithms according SecurityAccess* classes (e.g.
Rsa).| Modifier and Type | Field and Description |
|---|---|
private AsymmetricKeyPairFactorySimple<PR,PU,PAIR> |
keyPairFactory |
provider| Constructor and Description |
|---|
AsymmetricKeyCreatorImpl(KeyFactory keyFactory,
int keyLength,
SecurityProvider provider,
AsymmetricKeyPairFactorySimple<PR,PU,PAIR> keyPairFactory,
RandomFactory randomFactory)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PAIR |
createKeyPair(PR privateKey,
PU publicKey) |
int |
getKeyLength(PR privateKey) |
int |
getKeyLength(PU publicKey) |
static AsymmetricKeyCreator<PrivateKey,PublicKey,AsymmetricKeyPairGeneric> |
of(String algorithm,
int keyLength) |
static AsymmetricKeyCreator<PrivateKey,PublicKey,AsymmetricKeyPairGeneric> |
of(String algorithm,
int keyLength,
RandomFactory randomFactory) |
static AsymmetricKeyCreator<PrivateKey,PublicKey,AsymmetricKeyPairGeneric> |
of(String algorithm,
int keyLength,
SecurityProvider provider,
RandomFactory randomFactory) |
asData, asData, asData, createKeyPair, createPrivateKey, createPublicKey, generateKeyPair, getKeyLength, init, register, registercreateSecureRandom, getRandomFactorygetAlgorithmgetProvidercreationFailedException, creationFailedException, creationFailedException, creationFailedException, getAlgorithm, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasBinary, asBinary, asBinary, asData, asData, asData, createKeyPair, createPrivateKey, createPublicKey, verifyKey, verifyKeygetAlgorithmasBinaryasBinaryasBinaryprivate final AsymmetricKeyPairFactorySimple<PR extends PrivateKey,PU extends PublicKey,PAIR extends AbstractAsymmetricKeyPair<PR,PU>> keyPairFactory
public AsymmetricKeyCreatorImpl(KeyFactory keyFactory, int keyLength, SecurityProvider provider, AsymmetricKeyPairFactorySimple<PR,PU,PAIR> keyPairFactory, RandomFactory randomFactory)
keyFactory - the KeyFactory.keyLength - the key length.provider - the security SecurityProvider.keyPairFactory - the AsymmetricKeyPairFactorySimple.randomFactory - the RandomFactory.public PAIR createKeyPair(PR privateKey, PU publicKey)
privateKey - the PrivateKey.publicKey - the corresponding PublicKey.AsymmetricKeyPair.public int getKeyLength(PR privateKey)
privateKey - the PrivateKey.key length of the given key in bits.public int getKeyLength(PU publicKey)
publicKey - the PublicKey.key length of the given key in bits.public static AsymmetricKeyCreator<PrivateKey,PublicKey,AsymmetricKeyPairGeneric> of(String algorithm, int keyLength)
algorithm - the algorithm.keyLength - the key length.AsymmetricKeyCreator.public static AsymmetricKeyCreator<PrivateKey,PublicKey,AsymmetricKeyPairGeneric> of(String algorithm, int keyLength, RandomFactory randomFactory)
algorithm - the algorithm.keyLength - the key length.randomFactory - the RandomFactory.AsymmetricKeyCreator.public static AsymmetricKeyCreator<PrivateKey,PublicKey,AsymmetricKeyPairGeneric> of(String algorithm, int keyLength, SecurityProvider provider, RandomFactory randomFactory)
algorithm - the algorithm.keyLength - the key length.provider - the SecurityProvider.randomFactory - the RandomFactory.AsymmetricKeyCreator.Copyright © 2001–2019 mmm-Team. All rights reserved.