Skip to content

Most visited

Recently visited

navigation
Added in API level 1

DHParameterSpec

public class DHParameterSpec
extends Object implements AlgorithmParameterSpec

java.lang.Object
   ↳ javax.crypto.spec.DHParameterSpec


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.

Inherited methods

From class java.lang.Object

Public constructors

DHParameterSpec

Added in API level 1
DHParameterSpec (BigInteger p, 
                BigInteger g)

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

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

DHParameterSpec

Added in API level 1
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.

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

Public methods

getG

Added in API level 1
BigInteger getG ()

Returns the base generator of this parameter specification.

Returns
BigInteger the base generator.

getL

Added in API level 1
int getL ()

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

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

getP

Added in API level 1
BigInteger getP ()

Returns the prime modulus of this parameter specification.

Returns
BigInteger the prime modulus.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.