Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
com.sun.crypto.provider
public final class: DHKeyPairGenerator [javadoc | source]
java.lang.Object
   java.security.KeyPairGeneratorSpi
      com.sun.crypto.provider.DHKeyPairGenerator
This class represents the key pair generator for Diffie-Hellman key pairs.

This key pair generator may be initialized in two different ways:

Constructor:
 public DHKeyPairGenerator() 
Method from com.sun.crypto.provider.DHKeyPairGenerator Summary:
generateKeyPair,   initialize,   initialize
Methods from java.security.KeyPairGeneratorSpi:
generateKeyPair,   initialize,   initialize
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.crypto.provider.DHKeyPairGenerator Detail:
 public KeyPair generateKeyPair() 
    Generates a key pair.
 public  void initialize(int keysize,
    SecureRandom random) 
    Initializes this key pair generator for a certain keysize and source of randomness. The keysize is specified as the size in bits of the prime modulus.
 public  void initialize(AlgorithmParameterSpec algParams,
    SecureRandom random) throws InvalidAlgorithmParameterException 
    Initializes this key pair generator for the specified parameter set and source of randomness.

    The given parameter set contains the prime modulus, the base generator, and optionally the requested size in bits of the random exponent (private value).