Package javax.crypto.spec
Class DHPublicKeySpec
java.lang.Object
javax.crypto.spec.DHPublicKeySpec
- All Implemented Interfaces:
KeySpec
public class DHPublicKeySpec extends Object implements KeySpec
The key specification for a Diffie-Hellman public key.
-
Constructor Summary
Constructors Constructor Description DHPublicKeySpec(BigInteger y, BigInteger p, BigInteger g)Creates a newDHPublicKeySpecinstance with the specified public valuey, the prime moduluspand the base generatorg. -
Method Summary
Modifier and Type Method Description BigIntegergetG()Returns the base generatorg;BigIntegergetP()Returns the prime modulusp.BigIntegergetY()Returns the public valuey.
-
Constructor Details
-
DHPublicKeySpec
Creates a newDHPublicKeySpecinstance with the specified public valuey, the prime moduluspand the base generatorg.- Parameters:
y- the public value.p- the prime modulus.g- the base generator.
-
-
Method Details
-
getY
Returns the public valuey.- Returns:
- the public value
y.
-
getP
Returns the prime modulusp.- Returns:
- the prime modulus
p.
-
getG
Returns the base generatorg;- Returns:
- the base generator
g;
-