Class DHPrivateKeyParameters

  • All Implemented Interfaces:
    javax.security.auth.Destroyable, CipherParameters

    public class DHPrivateKeyParameters
    extends DHKeyParameters
    implements javax.security.auth.Destroyable
    • Constructor Detail

      • DHPrivateKeyParameters

        public DHPrivateKeyParameters​(java.math.BigInteger x,
                                      DHParameters 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, 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