Stay organized with collections
Save and categorize content based on your preferences.
RSAPublicKey
public
interface
RSAPublicKey
implements
PublicKey,
RSAKey
java.security.interfaces.RSAPublicKey
|
The interface to an RSA public key.
Summary
Constants |
long |
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.Key
long |
serialVersionUID
This constant was deprecated
in API level 34.
A serialVersionUID field in an interface is
ineffectual. Do not use; no replacement.
|
|
Inherited methods |
|
From interface
java.security.Key
abstract
String
|
getAlgorithm()
Returns the standard algorithm name for this key.
|
abstract
byte[]
|
getEncoded()
Returns the key in its primary encoding format, or null
if this key does not support encoding.
|
abstract
String
|
getFormat()
Returns the name of the primary encoding format of this key,
or null if this key does not support encoding.
|
|
Constants
serialVersionUID
public static final long serialVersionUID
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.
Constant Value:
-8727434096241101194
(0x86e1ecedeceab676)
Public methods
getPublicExponent
public abstract BigInteger getPublicExponent ()
Returns the public exponent.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# RSAPublicKey\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Constants](#constants) \\| [Inherited Constants](#inhconstants) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nRSAPublicKey\n============\n\n\n`\npublic\n\n\ninterface\nRSAPublicKey\n`\n\n\n`\n\n\nimplements\n\n`[PublicKey](/reference/java/security/PublicKey)`,\n\n`[RSAKey](/reference/java/security/interfaces/RSAKey)`\n\n\n`\n\n|---------------------------------------|\n| java.security.interfaces.RSAPublicKey |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThe interface to an RSA public key.\n\nSummary\n-------\n\n| ### Constants ||\n|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `long` | [serialVersionUID](/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.* |\n\n| ### Inherited constants |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| From interface [java.security.PublicKey](/reference/java/security/PublicKey) |--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `long` | [serialVersionUID](/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.* | |\n| From interface [java.security.Key](/reference/java/security/Key) |--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `long` | [serialVersionUID](/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.* | |\n\n| ### Public methods ||\n|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[BigInteger](/reference/java/math/BigInteger) | ` `[getPublicExponent](/reference/java/security/interfaces/RSAPublicKey#getPublicExponent())`() ` Returns the public exponent. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` `[java.security.interfaces.RSAKey](/reference/java/security/interfaces/RSAKey)` ` |-------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[BigInteger](/reference/java/math/BigInteger) | ` `[getModulus](/reference/java/security/interfaces/RSAKey#getModulus())`() ` Returns the modulus. | | ` default `[AlgorithmParameterSpec](/reference/java/security/spec/AlgorithmParameterSpec) | ` `[getParams](/reference/java/security/interfaces/RSAKey#getParams())`() ` Returns the parameters associated with this key. | ||\n| From interface ` `[java.security.Key](/reference/java/security/Key)` ` |---------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[String](/reference/java/lang/String) | ` `[getAlgorithm](/reference/java/security/Key#getAlgorithm())`() ` Returns the standard algorithm name for this key. | | ` abstract byte[]` | ` `[getEncoded](/reference/java/security/Key#getEncoded())`() ` Returns the key in its primary encoding format, or null if this key does not support encoding. | | ` abstract `[String](/reference/java/lang/String) | ` `[getFormat](/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. | ||\n\nConstants\n---------\n\n### serialVersionUID\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n35](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final long serialVersionUID\n```\n\n\n**This constant was deprecated\nin API level 35.** \n\nA `serialVersionUID` field in an interface is\nineffectual. Do not use; no replacement.\n\nThe type fingerprint that is set to indicate\nserialization compatibility with a previous\nversion of the type.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n-8727434096241101194\n(0x86e1ecedeceab676)\n\n\nPublic methods\n--------------\n\n### getPublicExponent\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract BigInteger getPublicExponent ()\n```\n\nReturns the public exponent.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------------------------------------------|----------------------------|\n| [BigInteger](/reference/java/math/BigInteger) | the public exponent \u003cbr /\u003e |"]]