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:
- CipherParameters, javax.security.auth.Destroyable
- public class ElGamalPrivateKeyParameters
- extends ElGamalKeyParameters
- implements javax.security.auth.Destroyable
|
Method Summary |
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()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
ElGamalPrivateKeyParameters
public ElGamalPrivateKeyParameters(java.math.BigInteger x,
ElGamalParameters params)
getX
public java.math.BigInteger getX()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class ElGamalKeyParameters
hashCode
public int hashCode()
- Overrides:
hashCode in class ElGamalKeyParameters
destroy
public void destroy()
- Destroy this object, dropping its reference to the private value.
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.
- Specified by:
destroy in interface javax.security.auth.Destroyable
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed in interface javax.security.auth.Destroyable