Class DHPublicKeySpec

  • All Implemented Interfaces:
    KeySpec

    public class DHPublicKeySpec
    extends Object
    implements KeySpec
    The key specification for a Diffie-Hellman public key.
    • Constructor Detail

      • DHPublicKeySpec

        public DHPublicKeySpec​(BigInteger y,
                               BigInteger p,
                               BigInteger g)
        Creates a new DHPublicKeySpec instance with the specified public value y, the prime modulus p and the base generator g.
        Parameters:
        y - the public value.
        p - the prime modulus.
        g - the base generator.
    • Method Detail

      • getY

        public BigInteger getY()
        Returns the public value y.
        Returns:
        the public value y.
      • 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;