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 Details

    • DHPrivateKeySpec

      public DHPrivateKeySpec​(BigInteger x, BigInteger p, BigInteger g)
      Creates a new DHPrivateKeySpec with the specified private value x. prime modulus p and base generator g.
      Parameters:
      x - the private value.
      p - the prime modulus.
      g - the base generator.
  • Method Details

    • getX

      public BigInteger getX()
      Returns the private value x.
      Returns:
      the private value x.
    • getP

      public BigInteger getP()
      Returns the prime modulus p.
      Returns:
      the prime modulus p.
    • getG

      public BigInteger getG()
      Returns the base generator g.
      Returns:
      the base generator g.