public class DHPrivateKeyParameters extends DHKeyParameters implements javax.security.auth.Destroyable
| Constructor and Description |
|---|
DHPrivateKeyParameters(java.math.BigInteger x,
DHParameters 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 DHPrivateKeyParameters(java.math.BigInteger x,
DHParameters params)
public java.math.BigInteger getX()
public int hashCode()
hashCode in class DHKeyParameterspublic boolean equals(java.lang.Object obj)
equals in class DHKeyParameterspublic 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