Stay organized with collections
Save and categorize content based on your preferences.
RSAKey
interface RSAKey
Known Indirect Subclasses
RSAMultiPrimePrivateCrtKey |
The interface to an RSA multi-prime private key, as defined in the PKCS#1 v2.2 standard, using the Chinese Remainder Theorem (CRT) information values.
|
RSAPrivateCrtKey |
The interface to an RSA private key, as defined in the PKCS#1 v2.2 standard, using the Chinese Remainder Theorem (CRT) information values.
|
|
The interface to a public or private key in PKCS#1 v2.2 standard, such as those for RSA, or RSASSA-PSS algorithms.
Summary
Public methods
getModulus
abstract fun getModulus(): BigInteger!
Returns the modulus.
getParams
open fun getParams(): AlgorithmParameterSpec!
Returns the parameters associated with this key. The parameters are optional and may be either explicitly specified or implicitly created during key pair generation.
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,["# RSAKey\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nRSAKey\n======\n\n```\ninterface RSAKey\n```\n\n|--------------------------------------|\n| [java.security.interfaces.RSAKey](#) |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [RSAPrivateKey](/reference/kotlin/java/security/interfaces/RSAPrivateKey), [RSAPublicKey](/reference/kotlin/java/security/interfaces/RSAPublicKey) |---------------------------------------------------------------------------|--------------------------------------| | [RSAPrivateKey](/reference/kotlin/java/security/interfaces/RSAPrivateKey) | The interface to an RSA private key. | | [RSAPublicKey](/reference/kotlin/java/security/interfaces/RSAPublicKey) | The interface to an RSA public key. | |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Indirect Subclasses [RSAMultiPrimePrivateCrtKey](/reference/kotlin/java/security/interfaces/RSAMultiPrimePrivateCrtKey), [RSAPrivateCrtKey](/reference/kotlin/java/security/interfaces/RSAPrivateCrtKey) |-----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [RSAMultiPrimePrivateCrtKey](/reference/kotlin/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](/reference/kotlin/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. | |\n\nThe interface to a public or private key in [PKCS#1 v2.2](https://tools.ietf.org/rfc/rfc8017.txt) standard, such as those for RSA, or RSASSA-PSS algorithms.\n\nSummary\n-------\n\n| Public methods ||\n|----------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| abstract [BigInteger](../../math/BigInteger.html#)! | [getModulus](#getModulus())`()` Returns the modulus. |\n| open [AlgorithmParameterSpec](../spec/AlgorithmParameterSpec.html#)! | [getParams](#getParams())`()` Returns the parameters associated with this key. |\n\nPublic methods\n--------------\n\n### getModulus\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getModulus(): BigInteger!\n```\n\nReturns the modulus.\n\n| Return ||\n|--------------------------------------------|-------------|\n| [BigInteger](../../math/BigInteger.html#)! | the modulus |\n\n### getParams\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getParams(): AlgorithmParameterSpec!\n```\n\nReturns the parameters associated with this key. The parameters are optional and may be either explicitly specified or implicitly created during key pair generation.\n\n| Return ||\n|-----------------------------------------------------------------|----------------------------------------|\n| [AlgorithmParameterSpec](../spec/AlgorithmParameterSpec.html#)! | the associated parameters, may be null |"]]