Bouncy Castle Cryptography Library 1.86

org.bouncycastle.crypto.params
Class GOST3410PrivateKeyParameters

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

public class GOST3410PrivateKeyParameters
extends GOST3410KeyParameters
implements javax.security.auth.Destroyable


Constructor Summary
GOST3410PrivateKeyParameters(java.math.BigInteger x, GOST3410Parameters 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.GOST3410KeyParameters
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

GOST3410PrivateKeyParameters

public GOST3410PrivateKeyParameters(java.math.BigInteger x,
                                    GOST3410Parameters 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