Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cryptix.jce.provider.dh
Class DHKeyPairGenerator  view DHKeyPairGenerator download DHKeyPairGenerator.java

java.lang.Object
  extended byjava.security.KeyPairGeneratorSpi
      extended bycryptix.jce.provider.dh.DHKeyPairGenerator

public final class DHKeyPairGenerator
extends java.security.KeyPairGeneratorSpi


Field Summary
private static int CERTAINTY
           
private  java.math.BigInteger g
           
private  boolean initialized
          Initialized already?
private static int KEYSIZE_DEFAULT
           
private static int KEYSIZE_MAX
           
private static int KEYSIZE_MIN
           
private static java.math.BigInteger ONE
           
private  java.math.BigInteger p
           
private  java.security.SecureRandom random
           
private  int xLen
          Bit length of the generated value x.
private static java.math.BigInteger ZERO
           
 
Constructor Summary
DHKeyPairGenerator()
           
 
Method Summary
 java.security.KeyPair generateKeyPair()
          Generates a KeyPair according the rules for the algorithm.
private  void initialize()
          Initialize with default values
 void initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
          Initialize the KeyPairGeneratorSpi with the specified AlgorithmParameterSpec and source of randomness This is a concrete method.
 void initialize(int keysize, java.security.SecureRandom random)
          Initialize the KeyPairGeneratorSpi with the specified key size and source of randomness
 
Methods inherited from class java.security.KeyPairGeneratorSpi
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZERO

private static final java.math.BigInteger ZERO

ONE

private static final java.math.BigInteger ONE

KEYSIZE_MIN

private static final int KEYSIZE_MIN
See Also:
Constant Field Values

KEYSIZE_MAX

private static final int KEYSIZE_MAX
See Also:
Constant Field Values

KEYSIZE_DEFAULT

private static final int KEYSIZE_DEFAULT
See Also:
Constant Field Values

CERTAINTY

private static final int CERTAINTY
See Also:
Constant Field Values

random

private java.security.SecureRandom random

p

private java.math.BigInteger p

g

private java.math.BigInteger g

xLen

private int xLen
Bit length of the generated value x. Must be valid.


initialized

private boolean initialized
Initialized already?

Constructor Detail

DHKeyPairGenerator

public DHKeyPairGenerator()
Method Detail

initialize

public void initialize(int keysize,
                       java.security.SecureRandom random)
Description copied from class: java.security.KeyPairGeneratorSpi
Initialize the KeyPairGeneratorSpi with the specified key size and source of randomness


initialize

public void initialize(java.security.spec.AlgorithmParameterSpec params,
                       java.security.SecureRandom random)
                throws java.security.InvalidAlgorithmParameterException
Description copied from class: java.security.KeyPairGeneratorSpi
Initialize the KeyPairGeneratorSpi with the specified AlgorithmParameterSpec and source of randomness This is a concrete method. It may be overridden by the provider and if the AlgorithmParameterSpec class is invalid throw InvalidAlgorithmParameterException. By default this method just throws UnsupportedOperationException.


generateKeyPair

public java.security.KeyPair generateKeyPair()
Description copied from class: java.security.KeyPairGeneratorSpi
Generates a KeyPair according the rules for the algorithm. Unless intialized, algorithm defaults will be used. It creates a unique key pair each time.


initialize

private void initialize()
Initialize with default values