# RSAPublicKey

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

# RSAPublicKey

`
public


interface
RSAPublicKey
`  
`


implements

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

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


`

|---------------------------------------|
| java.security.interfaces.RSAPublicKey |

<br />

*** ** * ** ***

The interface to an RSA public key.

## Summary

|                                                                                                                          ### Constants                                                                                                                          ||
|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `long` | [serialVersionUID](https://developer.android.com/reference/java/security/interfaces/RSAPublicKey#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.PublicKey](https://developer.android.com/reference/java/security/PublicKey) |--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `long` | [serialVersionUID](https://developer.android.com/reference/java/security/PublicKey#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) | ` `[getPublicExponent](https://developer.android.com/reference/java/security/interfaces/RSAPublicKey#getPublicExponent())`() ` Returns the public 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` `[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: -8727434096241101194 (0x86e1ecedeceab676)

## Public methods

### getPublicExponent

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

```
public abstract BigInteger getPublicExponent ()
```

Returns the public exponent.

<br />

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