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

Quick Search    Search Deep

javax.crypto.spec
Class DHParameterSpec  view DHParameterSpec download DHParameterSpec.java

java.lang.Object
  extended byjavax.crypto.spec.DHParameterSpec
All Implemented Interfaces:
java.security.spec.AlgorithmParameterSpec

public class DHParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec

The base set of parameters necessary to perform Diffie-Hellman key exchange. Each party in the key exchange shares these parameters.

Each set of parameters consists of a base generator g, a prime modulus p, and an optional length, in bits, of the private exponent.

See PKCS #3 - Diffie-Hellman Key Agreement Standard for more information.

Since:
1.4

Field Summary
private  java.math.BigInteger g
          The base generator g.
private  int l
          The length, in bits, of the private exponent.
private  java.math.BigInteger p
          The prime modulus p.
 
Constructor Summary
DHParameterSpec(java.math.BigInteger p, java.math.BigInteger g)
          Create a new set of Diffie-Hellman parameters.
DHParameterSpec(java.math.BigInteger p, java.math.BigInteger g, int l)
          Create a new set of Diffie-Hellman parameters.
 
Method Summary
 java.math.BigInteger getG()
          Get the base generator, g.
 int getL()
          Get the length of the private exponent, in bits.
 java.math.BigInteger getP()
          Get the prime modulus, p.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

g

private java.math.BigInteger g
The base generator g.


p

private java.math.BigInteger p
The prime modulus p.


l

private int l
The length, in bits, of the private exponent.

Constructor Detail

DHParameterSpec

public DHParameterSpec(java.math.BigInteger p,
                       java.math.BigInteger g)
Create a new set of Diffie-Hellman parameters.


DHParameterSpec

public DHParameterSpec(java.math.BigInteger p,
                       java.math.BigInteger g,
                       int l)
Create a new set of Diffie-Hellman parameters.

Method Detail

getG

public java.math.BigInteger getG()
Get the base generator, g.


getL

public int getL()
Get the length of the private exponent, in bits.


getP

public java.math.BigInteger getP()
Get the prime modulus, p.