open class RSAPrivateKeySpec : KeySpec

This class specifies an RSA private key.

Summary

Public constructors

RSAPrivateKeySpec(modulus: BigInteger!, privateExponent: BigInteger!)

Creates a new RSAPrivateKeySpec.

RSAPrivateKeySpec(modulus: BigInteger!, privateExponent: BigInteger!, params: AlgorithmParameterSpec!)

Creates a new RSAPrivateKeySpec with additional key parameters.

Public methods
open BigInteger!

Returns the modulus.

open AlgorithmParameterSpec!

getParams()

Returns the parameters associated with this key, may be null if not present.

open BigInteger!

Returns the private exponent.

Public constructors

RSAPrivateKeySpec

RSAPrivateKeySpec(
    modulus: BigInteger!,
    privateExponent: BigInteger!)

Creates a new RSAPrivateKeySpec.

Parameters
modulus BigInteger!: the modulus
privateExponent BigInteger!: the private exponent

Public methods

getPrivateExponent

open fun getPrivateExponent(): BigInteger!

Returns the private exponent.

Return
BigInteger! the private 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.