Package javax.crypto.spec
Class DHPrivateKeySpec
java.lang.Object
javax.crypto.spec.DHPrivateKeySpec
- All Implemented Interfaces:
KeySpec
public class DHPrivateKeySpec extends Object implements KeySpec
The key specification for a Diffie-Hellman private key.
-
Constructor Summary
Constructors Constructor Description DHPrivateKeySpec(BigInteger x, BigInteger p, BigInteger g)Creates a newDHPrivateKeySpecwith the specified private valuex. -
Method Summary
Modifier and Type Method Description BigIntegergetG()Returns the base generatorg.BigIntegergetP()Returns the prime modulusp.BigIntegergetX()Returns the private valuex.
-
Constructor Details
-
DHPrivateKeySpec
Creates a newDHPrivateKeySpecwith the specified private valuex. prime moduluspand base generatorg.- Parameters:
x- the private value.p- the prime modulus.g- the base generator.
-
-
Method Details
-
getX
Returns the private valuex.- Returns:
- the private value
x.
-
getP
Returns the prime modulusp.- Returns:
- the prime modulus
p.
-
getG
Returns the base generatorg.- Returns:
- the base generator
g.
-