public class ElGamalParameterSpec extends PKCS1AlgorithmParameterSpec implements java.security.spec.AlgorithmParameterSpec
Constructor and Description |
---|
ElGamalParameterSpec(java.math.BigInteger p,
java.math.BigInteger g)
Creates a ElGamal parameter specification, based on given prime
modulus p and base generator g.
|
ElGamalParameterSpec(java.math.BigInteger p,
java.math.BigInteger g,
int l)
Creates a ElGamal parameter specification, based on given prime
modulus p, base generator g, and random exponent size l.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.math.BigInteger |
getG()
Returns the base generator g.
|
int |
getL()
Returns the random exponent size l, in bits.
|
java.math.BigInteger |
getP()
Returns the prime modulus p.
|
int |
hashCode() |
java.lang.String |
toString()
Returns a string representation of this Object.
|
getSecureRandom, setSecureRandom
public ElGamalParameterSpec(java.math.BigInteger p, java.math.BigInteger g)
p
- the prime modulusg
- the base generatorpublic ElGamalParameterSpec(java.math.BigInteger p, java.math.BigInteger g, int l)
p
- the prime modulusg
- the base generatorl
- the random exponent size in bitspublic java.math.BigInteger getP()
public java.math.BigInteger getG()
public int getL()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object