# DHPrivateKey

public interface **DHPrivateKey** implements [DHKey](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/interfaces/DHKey.html) [PrivateKey](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/PrivateKey.html) The interface to a Diffie-Hellman private key.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/interfaces/DHKey.html`
- `https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/interfaces/DHPublicKey.html`

### Constant Summary

|---|---|---|
| long | [serialVersionUID](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/interfaces/DHPrivateKey.html#serialVersionUID) | The class fingerprint that is set to indicate serialization compatibility since J2SE 1.4. |

### Inherited Constant Summary

From interface [java.security.PrivateKey](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/PrivateKey.html)

|---|---|---|
| long | [serialVersionUID](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/PrivateKey.html#serialVersionUID) | The class fingerprint that is set to indicate serialization compatibility with a previous version of the class. |

From interface [java.security.Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html)

|---|---|---|
| long | [serialVersionUID](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html#serialVersionUID) | The class fingerprint that is set to indicate serialization compatibility with a previous version of the class. |

### Public Method Summary

|---|---|
| abstract BigInteger | [getX](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/interfaces/DHPrivateKey.html#getX())() Returns the private value, `x`. |

### Inherited Method Summary

From interface [javax.crypto.interfaces.DHKey](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/interfaces/DHKey.html)

|---|---|
| abstract [DHParameterSpec](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/spec/DHParameterSpec.html) | [getParams](https://developers.google.com/j2objc/javadoc/jre/reference/javax/crypto/interfaces/DHKey.html#getParams())() Returns the key parameters. |

From interface [java.security.Key](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html)

|---|---|
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getAlgorithm](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html#getAlgorithm())() Returns the standard algorithm name for this key. |
| abstract byte\[\] | [getEncoded](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html#getEncoded())() Returns the key in its primary encoding format, or null if this key does not support encoding. |
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getFormat](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Key.html#getFormat())() Returns the name of the primary encoding format of this key, or null if this key does not support encoding. |

From interface [javax.security.auth.Destroyable](https://developers.google.com/j2objc/javadoc/jre/reference/javax/security/auth/Destroyable.html)

|---|---|
| void | [destroy](https://developers.google.com/j2objc/javadoc/jre/reference/javax/security/auth/Destroyable.html#destroy())() Destroy this `Object`. |
| boolean | [isDestroyed](https://developers.google.com/j2objc/javadoc/jre/reference/javax/security/auth/Destroyable.html#isDestroyed())() Determine if this `Object` has been destroyed. |

## Constants

#### public static final long
**serialVersionUID**

The class fingerprint that is set to indicate serialization
compatibility since J2SE 1.4.
Constant Value: 2211791113380396553

## Public Methods

#### public abstract BigInteger
**getX**
()

Returns the private value, `x`.

##### Returns

- the private value, `x`