FileDocCategorySizeDatePackage
DHParameterSpec.javaAPI DocAndroid 1.5 API2674Wed May 06 22:41:02 BST 2009javax.crypto.spec

DHParameterSpec

public class DHParameterSpec extends Object implements AlgorithmParameterSpec
The algorithm parameter specification for the Diffie-Hellman algorithm.
since
Android 1.0

Fields Summary
private final BigInteger
p
private final BigInteger
g
private final int
l
Constructors Summary
public DHParameterSpec(BigInteger p, BigInteger g)
Creates a new DHParameterSpec instance with the specified prime modulus and base generator.

param
p the prime modulus.
param
g the base generator.

        this.p = p;
        this.g = g;
        this.l = 0;
    
public DHParameterSpec(BigInteger p, BigInteger g, int l)
Creates a new DHParameterSpec instance with the specified prime modulus, base generator and size (in bits) of the random exponent.

param
p the prime modulus.
param
g the base generator.
param
l the size of the random exponent (in bits).

        this.p = p;
        this.g = g;
        this.l = l;
    
Methods Summary
public java.math.BigIntegergetG()
Returns the base generator of this parameter specification.

return
the base generator.

        return g;
    
public intgetL()
Returns the size (in bits) of the random exponent.

return
the size (in bits) of the random exponent.

        return l;
    
public java.math.BigIntegergetP()
Returns the prime modulus of this parameter specification.

return
the prime modulus.

        return p;