java.lang.Object
net.i2p.crypto.elgamal.spec.ElGamalParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec

public class ElGamalParameterSpecextends Object implements AlgorithmParameterSpec
Copied from org.bouncycastle.jce.spec This can't actually be passed to the BC provider, we would have to use reflection to create a "real" org.bouncycasle.jce.spec.ElGamalParameterSpec.
  • Field Details

  • Constructor Details

    • ElGamalParameterSpec

      public ElGamalParameterSpec(BigInteger p, BigInteger g)
      Parameter set for Diffie-Hellman, using a prime modulus p and a base generator g.
      Parameters:
      p - The prime modulus.
      g - The base generator.
  • Method Details

    • 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
    • hashCode

      public int hashCode()
      Returns a hash code for this parameter specification.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code
    • equals

      public boolean equals(Object obj)
      Compares this ElGamal parameter spec to another object for equality.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare
      Returns:
      true if the objects are equal