Bouncy Castle Cryptography Library 1.86

org.bouncycastle.crypto.params
Class DSAPrivateKeyParameters

java.lang.Object
  extended byorg.bouncycastle.crypto.params.AsymmetricKeyParameter
      extended byorg.bouncycastle.crypto.params.DSAKeyParameters
          extended byorg.bouncycastle.crypto.params.DSAPrivateKeyParameters
All Implemented Interfaces:
CipherParameters, javax.security.auth.Destroyable

public class DSAPrivateKeyParameters
extends DSAKeyParameters
implements javax.security.auth.Destroyable


Constructor Summary
DSAPrivateKeyParameters(java.math.BigInteger x, DSAParameters params)
           
 
Method Summary
 void destroy()
          Destroy this object, dropping its reference to the private value.
 java.math.BigInteger getX()
           
 boolean isDestroyed()
           
 
Methods inherited from class org.bouncycastle.crypto.params.DSAKeyParameters
getParameters
 
Methods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter
isPrivate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSAPrivateKeyParameters

public DSAPrivateKeyParameters(java.math.BigInteger x,
                               DSAParameters params)
Method Detail

getX

public java.math.BigInteger getX()

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.

Specified by:
destroy in interface javax.security.auth.Destroyable

isDestroyed

public boolean isDestroyed()
Specified by:
isDestroyed in interface javax.security.auth.Destroyable

Bouncy Castle Cryptography Library 1.86