public class ElGamalPrivateKeyParameters extends ElGamalKeyParameters implements javax.security.auth.Destroyable
| Constructor and Description |
|---|
ElGamalPrivateKeyParameters(java.math.BigInteger x,
ElGamalParameters params) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy this object, dropping its reference to the private value.
|
boolean |
equals(java.lang.Object obj) |
java.math.BigInteger |
getX() |
int |
hashCode() |
boolean |
isDestroyed() |
getParametersisPrivatepublic ElGamalPrivateKeyParameters(java.math.BigInteger x,
ElGamalParameters params)
public java.math.BigInteger getX()
public boolean equals(java.lang.Object obj)
equals in class ElGamalKeyParameterspublic int hashCode()
hashCode in class ElGamalKeyParameterspublic void destroy()
As BigInteger is 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 destruction
getX() throws IllegalStateException, hashCode() retains its
pre-destruction value and the object is equal only to itself.
destroy in interface javax.security.auth.Destroyablepublic boolean isDestroyed()
isDestroyed in interface javax.security.auth.Destroyable