Cumulus4j API
(1.2.0-SNAPSHOT)

org.cumulus4j.crypto
Interface AsymmetricCipherKeyPairGeneratorFactory

All Known Implementing Classes:
AbstractAsymmetricCipherKeyPairGeneratorFactory, DHBasicKeyPairGeneratorFactory, DSAKeyPairGeneratorFactory, ElGamalKeyPairGeneratorFactory, GOST3410KeyPairGeneratorFactory, NaccacheSternKeyPairGeneratorFactory, RSAKeyPairGeneratorFactory

public interface AsymmetricCipherKeyPairGeneratorFactory

Factory creating instances of AsymmetricCipherKeyPairGenerator.

Implementations of this interface are used by CryptoRegistry.createKeyPairGenerator(String, boolean) to provide instances of AsymmetricCipherKeyPairGenerator.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Method Summary
 AsymmetricCipherKeyPairGenerator createAsymmetricCipherKeyPairGenerator(boolean initWithDefaults)
          Create and optionally initialise a new instance of AsymmetricCipherKeyPairGenerator.
 String getAlgorithmName()
          Get the name of the encryption algorithm for which keys should be generated.
 void setAlgorithmName(String algorithmName)
          Set the name of the encryption algorithm for which keys are to be generated.
 

Method Detail

createAsymmetricCipherKeyPairGenerator

AsymmetricCipherKeyPairGenerator createAsymmetricCipherKeyPairGenerator(boolean initWithDefaults)
Create and optionally initialise a new instance of AsymmetricCipherKeyPairGenerator.

Parameters:
initWithDefaults - whether to initialise the AsymmetricCipherKeyPairGenerator with default values so that it can be used immediately as-is.
Returns:
a new instance of AsymmetricCipherKeyPairGenerator (iff initWithDefaults==true ready-to-use; otherwise requiring initialisation before it can be used).

getAlgorithmName

String getAlgorithmName()
Get the name of the encryption algorithm for which keys should be generated. For example "RSA". See Supported algorithms for a list of supported algorithms.

Returns:
the name of the encryption algorithm for which keys are to be generated.

setAlgorithmName

void setAlgorithmName(String algorithmName)
Set the name of the encryption algorithm for which keys are to be generated. This method should never be called by API consumers! It should throw an IllegalStateException, if it is called again, after an algorithm name was already set before.

Parameters:
algorithmName - the name of the encryption algorithm; never null.
See Also:
getAlgorithmName()

Cumulus4j API
(1.2.0-SNAPSHOT)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.