# RSAPrivateKey

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/RSAPrivateKey#constants)\|[Inherited Constants](https://developer.android.com/reference/java/security/interfaces/RSAPrivateKey#inhconstants)\|[Methods](https://developer.android.com/reference/java/security/interfaces/RSAPrivateKey#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/java/security/interfaces/RSAPrivateKey#inhmethods)  

# RSAPrivateKey

`
public


interface
RSAPrivateKey
`  
`


implements

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

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


`

|----------------------------------------|
| java.security.interfaces.RSAPrivateKey |

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known indirect subclasses [RSAMultiPrimePrivateCrtKey](https://developer.android.com/reference/java/security/interfaces/RSAMultiPrimePrivateCrtKey),[RSAPrivateCrtKey](https://developer.android.com/reference/java/security/interfaces/RSAPrivateCrtKey) |---------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [RSAMultiPrimePrivateCrtKey](https://developer.android.com/reference/java/security/interfaces/RSAMultiPrimePrivateCrtKey) | The interface to an RSA multi-prime private key, as defined in the[PKCS#1 v2.2](https://tools.ietf.org/rfc/rfc8017.txt)standard, using the*Chinese Remainder Theorem*(CRT) information values. | | [RSAPrivateCrtKey](https://developer.android.com/reference/java/security/interfaces/RSAPrivateCrtKey)                     | The interface to an RSA private key, as defined in the[PKCS#1 v2.2](https://tools.ietf.org/rfc/rfc8017.txt)standard, using the*Chinese Remainder Theorem*(CRT) information values.             | |

<br />

*** ** * ** ***

The interface to an RSA private key.  
**See also:**

- [RSAPrivateCrtKey](https://developer.android.com/reference/java/security/interfaces/RSAPrivateCrtKey)

## Summary

|                                                                                                                          ### Constants                                                                                                                           ||
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `long` | [serialVersionUID](https://developer.android.com/reference/java/security/interfaces/RSAPrivateKey#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) | ` `[getPrivateExponent](https://developer.android.com/reference/java/security/interfaces/RSAPrivateKey#getPrivateExponent())`() ` Returns the private exponent. |

| ### Inherited methods |
|-----------------------|---|
| From interface` `[java.security.interfaces.RSAKey](https://developer.android.com/reference/java/security/interfaces/RSAKey)` ` |------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[BigInteger](https://developer.android.com/reference/java/math/BigInteger)                                 | ` `[getModulus](https://developer.android.com/reference/java/security/interfaces/RSAKey#getModulus())`() ` Returns the modulus.                           | | ` default `[AlgorithmParameterSpec](https://developer.android.com/reference/java/security/spec/AlgorithmParameterSpec) | ` `[getParams](https://developer.android.com/reference/java/security/interfaces/RSAKey#getParams())`() ` Returns the parameters associated with this key. | ||
| 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 type fingerprint that is set to indicate serialization compatibility with a previous version of the type.

<br />

Constant Value: 5187144804936595022 (0x47fc70b7a8c2364e)

## Public methods

### getPrivateExponent

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

```
public abstract BigInteger getPrivateExponent ()
```

Returns the private exponent.

<br />

|                                                 Returns                                                 ||
|----------------------------------------------------------------------------|-----------------------------|
| [BigInteger](https://developer.android.com/reference/java/math/BigInteger) | the private exponent <br /> |