# DSAPrivateKey

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/java/security/interfaces/DSAPrivateKey#constants)\|[Inherited Constants](https://developer.android.com/reference/java/security/interfaces/DSAPrivateKey#inhconstants)\|[Methods](https://developer.android.com/reference/java/security/interfaces/DSAPrivateKey#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/java/security/interfaces/DSAPrivateKey#inhmethods)  

# DSAPrivateKey

`
public


interface
DSAPrivateKey
`  
`


implements

`[DSAKey](https://developer.android.com/reference/java/security/interfaces/DSAKey)`,

`[PrivateKey](https://developer.android.com/reference/java/security/PrivateKey)`


`

|----------------------------------------|
| java.security.interfaces.DSAPrivateKey |

<br />

*** ** * ** ***

The standard interface to a DSA private key. DSA (Digital Signature Algorithm) is defined in NIST's FIPS-186.  
**See also:**

- [Key](https://developer.android.com/reference/java/security/Key)
- [Signature](https://developer.android.com/reference/java/security/Signature)
- [DSAKey](https://developer.android.com/reference/java/security/interfaces/DSAKey)
- [DSAPublicKey](https://developer.android.com/reference/java/security/interfaces/DSAPublicKey)

## Summary

|                                                                                                                          ### Constants                                                                                                                           ||
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `long` | [serialVersionUID](https://developer.android.com/reference/java/security/interfaces/DSAPrivateKey#serialVersionUID) *This constant was deprecated in API level 35. A`serialVersionUID`field in an interface is ineffectual. Do not use; no replacement.* |

|                                                                                                                                                                                                                                                                                                  ### Inherited constants                                                                                                                                                                                                                                                                                                   |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface[java.security.PrivateKey](https://developer.android.com/reference/java/security/PrivateKey) |--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `long` | [serialVersionUID](https://developer.android.com/reference/java/security/PrivateKey#serialVersionUID) *This constant was deprecated in API level 34. A`serialVersionUID`field in an interface is ineffectual. Do not use; no replacement.* | |
| From interface[java.security.Key](https://developer.android.com/reference/java/security/Key) |--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `long` | [serialVersionUID](https://developer.android.com/reference/java/security/Key#serialVersionUID) *This constant was deprecated in API level 34. A`serialVersionUID`field in an interface is ineffectual. Do not use; no replacement.* |                             |

|                                                                                                           ### Public methods                                                                                                            ||
|----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[BigInteger](https://developer.android.com/reference/java/math/BigInteger) | ` `[getX](https://developer.android.com/reference/java/security/interfaces/DSAPrivateKey#getX())`() ` Returns the value of the private key,`x`. |

| ### Inherited methods |
|-----------------------|---|
| From interface` `[java.security.interfaces.DSAKey](https://developer.android.com/reference/java/security/interfaces/DSAKey)` ` |-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[DSAParams](https://developer.android.com/reference/java/security/interfaces/DSAParams) | ` `[getParams](https://developer.android.com/reference/java/security/interfaces/DSAKey#getParams())`() ` Returns the DSA-specific key parameters. | ||
| From interface` `[javax.security.auth.Destroyable](https://developer.android.com/reference/javax/security/auth/Destroyable)` ` |--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| | ` default void`    | ` `[destroy](https://developer.android.com/reference/javax/security/auth/Destroyable#destroy())`() ` Destroy this`Object`.                                | | ` default boolean` | ` `[isDestroyed](https://developer.android.com/reference/javax/security/auth/Destroyable#isDestroyed())`() ` Determine if this`Object`has been destroyed. | ||
| From interface` `[java.security.Key](https://developer.android.com/reference/java/security/Key)` ` |--------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[String](https://developer.android.com/reference/java/lang/String) | ` `[getAlgorithm](https://developer.android.com/reference/java/security/Key#getAlgorithm())`() ` Returns the standard algorithm name for this key.                                                     | | ` abstract byte[]`                                                             | ` `[getEncoded](https://developer.android.com/reference/java/security/Key#getEncoded())`() ` Returns the key in its primary encoding format, or null if this key does not support encoding.            | | ` abstract `[String](https://developer.android.com/reference/java/lang/String) | ` `[getFormat](https://developer.android.com/reference/java/security/Key#getFormat())`() ` Returns the name of the primary encoding format of this key, or null if this key does not support encoding. | ||

## Constants

### serialVersionUID

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final long serialVersionUID
```

<br />

**This constant was deprecated in API level 35.**   
A`serialVersionUID`field in an interface is ineffectual. Do not use; no replacement.

The class fingerprint that is set to indicate serialization compatibility with a previous version of the class.

<br />

Constant Value: 7776497482533790279 (0x6bebab423b256247)

## Public methods

### getX

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract BigInteger getX ()
```

Returns the value of the private key,`x`.

<br />

|                                                       Returns                                                        ||
|----------------------------------------------------------------------------|------------------------------------------|
| [BigInteger](https://developer.android.com/reference/java/math/BigInteger) | the value of the private key,`x`. <br /> |