APIdia Launch Partner
Top Description Fields Constructors Methods
javax.crypto.spec

public Class DHPrivateKeySpec

extends Object
implements KeySpec
Class Inheritance
All Implemented Interfaces
java.security.spec.KeySpec
Imports
java.math.BigInteger

This class specifies a Diffie-Hellman private key with its associated parameters.

Note that this class does not perform any validation on specified parameters. Thus, the specified values are returned directly even if they are null.

Author
Jan Luehe
Since
1.4
See Also
DHPublicKeySpec

Field Summary

Modifier and TypeField and Description
private final BigInteger
g

private final BigInteger
p

private final BigInteger
x

Constructor Summary

AccessConstructor and Description
public
DHPrivateKeySpec(BigInteger
private value x
x
,
BigInteger
prime modulus p
p
,
BigInteger
base generator g
g
)

Constructor that takes a private value x, a prime modulus p, and a base generator g.

Method Summary

Modifier and TypeMethod and Description
public BigInteger

Returns:

the base generator g
getG
()

Returns the base generator g.

public BigInteger

Returns:

the prime modulus p
getP
()

Returns the prime modulus p.

public BigInteger

Returns:

the private value x
getX
()

Returns the private value x.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

gback to summary
private final BigInteger g
pback to summary
private final BigInteger p
xback to summary
private final BigInteger x

Constructor Detail

DHPrivateKeySpecback to summary
public DHPrivateKeySpec(BigInteger x, BigInteger p, BigInteger g)

Constructor that takes a private value x, a prime modulus p, and a base generator g.

Parameters
x:BigInteger

private value x

p:BigInteger

prime modulus p

g:BigInteger

base generator g

Method Detail

getGback to summary
public BigInteger getG()

Returns the base generator g.

Returns:BigInteger

the base generator g

getPback to summary
public BigInteger getP()

Returns the prime modulus p.

Returns:BigInteger

the prime modulus p

getXback to summary
public BigInteger getX()

Returns the private value x.

Returns:BigInteger

the private value x