Android APIs
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)

Added in API level 1

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

Parameters
p BigInteger: the prime modulus.
g BigInteger: the base generator.

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

Added in 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 BigInteger: the prime modulus.
g BigInteger: the base generator.
l int: the size of the random exponent (in bits).

Public Methods

public BigInteger getG ()

Added in API level 1

Returns the base generator of this parameter specification.

Returns
BigInteger the base generator.

public int getL ()

Added in API level 1

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

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

public BigInteger getP ()

Added in API level 1

Returns the prime modulus of this parameter specification.

Returns
BigInteger the prime modulus.