public class

DHParameterSpec

extends Object
implements AlgorithmParameterSpec
java.lang.Object
   ↳ javax.crypto.spec.DHParameterSpec

Class Overview

The algorithm parameter specification for the Diffie-Hellman algorithm.

Summary

Public Constructors
DHParameterSpec(BigInteger p, BigInteger g)
Creates a new DHParameterSpec instance with the specified prime modulus and base generator.
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.
Public Methods
BigInteger getG()
Returns the base generator of this parameter specification.
int getL()
Returns the size (in bits) of the random exponent.
BigInteger getP()
Returns the prime modulus of this parameter specification.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DHParameterSpec (BigInteger p, BigInteger g)

Since: API Level 1

Creates a new DHParameterSpec instance with the specified prime modulus and base generator.

Parameters
p the prime modulus.
g the base generator.

public DHParameterSpec (BigInteger p, BigInteger g, int l)

Since: API Level 1

Creates a new DHParameterSpec instance with the specified prime modulus, base generator and size (in bits) of the random exponent.

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

Public Methods

public BigInteger getG ()

Since: API Level 1

Returns the base generator of this parameter specification.

Returns
  • the base generator.

public int getL ()

Since: API Level 1

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

Returns
  • the size (in bits) of the random exponent.

public BigInteger getP ()

Since: API Level 1

Returns the prime modulus of this parameter specification.

Returns
  • the prime modulus.