de.flexiprovider.api.keys
Class KeyPairGenerator

java.lang.Object
  |
  +--java.security.KeyPairGeneratorSpi
        |
        +--de.flexiprovider.api.keys.KeyPairGenerator
Direct Known Subclasses:
CMSSKeyPairGenerator, DSAKeyPairGenerator, ECKeyPairGenerator, ElGamalKeyPairGenerator, GMSSKeyPairGenerator, IQDSAKeyPairGenerator, IQGQKeyPairGenerator, IQRDSAKeyPairGenerator, LMOTSKeyPairGenerator, McElieceCCA2KeyPairGenerator, McElieceKeyPairGenerator, MerkleOTSKeyPairGenerator, MeRSAKeyPairGenerator, MpRSAKeyPairGenerator, NiederreiterKeyPairGenerator, PFlashKeyPairGenerator, RainbowKeyPairGenerator, RbRSAKeyPairGenerator, RprimeRSAKeyPairGenerator, RSAKeyPairGenerator, SSVElGamalKeyPairGenerator

public abstract class KeyPairGenerator
extends java.security.KeyPairGeneratorSpi


Constructor Summary
KeyPairGenerator()
           
 
Method Summary
 java.security.KeyPair generateKeyPair()
          JCA adapter to FlexiAPI method genKeyPair(): generate a key pair.
abstract  KeyPair genKeyPair()
          Generate a key pair.
 void initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom javaRand)
          JCA adapter for FlexiAPI method initialize(AlgorithmParameterSpec, SecureRandom): initialize the key pair generator using the specified parameter set and source of randomness.
abstract  void initialize(AlgorithmParameterSpec params, SecureRandom random)
          Initialize the key pair generator using the specified parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
 void initialize(int keysize, java.security.SecureRandom javaRand)
          Initialize the key pair generator for a certain key size using a default parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
abstract  void initialize(int keysize, SecureRandom random)
          Initialize the key pair generator for a certain keysize using a default parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyPairGenerator

public KeyPairGenerator()
Method Detail

initialize

public void initialize(java.security.spec.AlgorithmParameterSpec params,
                       java.security.SecureRandom javaRand)
                throws java.security.InvalidAlgorithmParameterException
JCA adapter for FlexiAPI method initialize(AlgorithmParameterSpec, SecureRandom): initialize the key pair generator using the specified parameter set and source of randomness.
Overrides:
initialize in class java.security.KeyPairGeneratorSpi
Parameters:
params - the parameter set used to generate the keys
javaRand - the source of randomness for this generator
Throws:
java.security.InvalidAlgorithmParameterException - if the given parameters are inappropriate for this key pair generator.

initialize

public final void initialize(int keysize,
                             java.security.SecureRandom javaRand)
                      throws InvalidParameterException
Initialize the key pair generator for a certain key size using a default parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.)
Overrides:
initialize in class java.security.KeyPairGeneratorSpi
Parameters:
keysize - the keysize. This is an algorithm-specific metric, such as modulus length, specified in number of bits.
javaRand - the source of randomness for this generator
Throws:
InvalidParameterException - if the keysize is not supported by this KeyPairGenerator object.

generateKeyPair

public final java.security.KeyPair generateKeyPair()
JCA adapter to FlexiAPI method genKeyPair(): generate a key pair. Unless an initialization method is called using a KeyPairGenerator interface, algorithm-specific defaults will be used. This will generate a new key pair every time it is called.
Overrides:
generateKeyPair in class java.security.KeyPairGeneratorSpi
Returns:
a newly generated KeyPair

initialize

public abstract void initialize(AlgorithmParameterSpec params,
                                SecureRandom random)
                         throws InvalidAlgorithmParameterException
Initialize the key pair generator using the specified parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.).
Parameters:
params - the parameter set used to generate the keys
random - a source of randomness
Throws:
InvalidAlgorithmParameterException - if the given parameters are inappropriate for this key pair generator.

initialize

public abstract void initialize(int keysize,
                                SecureRandom random)
                         throws InvalidParameterException
Initialize the key pair generator for a certain keysize using a default parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.)
Parameters:
keysize - the keysize. This is an algorithm-specific metric, such as modulus length, specified in number of bits.
random - the source of randomness for this generator
Throws:
InvalidParameterException - if the keysize is not supported by this KeyPairGenerator object.

genKeyPair

public abstract KeyPair genKeyPair()
Generate a key pair. Unless an initialization method is called using a KeyPairGenerator interface, algorithm-specific defaults will be used. This will generate a new key pair every time it is called.
Returns:
a newly generated KeyPair