Package org.bouncycastle.crypto.params
Class ElGamalPrivateKeyParameters
- java.lang.Object
-
- org.bouncycastle.crypto.params.AsymmetricKeyParameter
-
- org.bouncycastle.crypto.params.ElGamalKeyParameters
-
- org.bouncycastle.crypto.params.ElGamalPrivateKeyParameters
-
- All Implemented Interfaces:
javax.security.auth.Destroyable,CipherParameters
public class ElGamalPrivateKeyParameters extends ElGamalKeyParameters implements javax.security.auth.Destroyable
-
-
Constructor Summary
Constructors Constructor Description ElGamalPrivateKeyParameters(java.math.BigInteger x, ElGamalParameters params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Destroy this object, dropping its reference to the private value.booleanequals(java.lang.Object obj)java.math.BigIntegergetX()inthashCode()booleanisDestroyed()-
Methods inherited from class org.bouncycastle.crypto.params.ElGamalKeyParameters
getParameters
-
Methods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter
isPrivate
-
-
-
-
Constructor Detail
-
ElGamalPrivateKeyParameters
public ElGamalPrivateKeyParameters(java.math.BigInteger x, ElGamalParameters params)
-
-
Method Detail
-
getX
public java.math.BigInteger getX()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classElGamalKeyParameters
-
hashCode
public int hashCode()
- Overrides:
hashCodein classElGamalKeyParameters
-
destroy
public void destroy()
Destroy this object, dropping its reference to the private value.As
BigIntegeris immutable the private value cannot be zeroized in place; destruction drops the internal reference so the value becomes unreachable (cleared on garbage collection). The (public) domain parameters are retained. After destructiongetX()throwsIllegalStateException,hashCode()retains its pre-destruction value and the object is equal only to itself.- Specified by:
destroyin interfacejavax.security.auth.Destroyable
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfacejavax.security.auth.Destroyable
-
-