Added in API level 1

RSAPrivateKeySpec

public class RSAPrivateKeySpec
extends Object implements KeySpec

java.lang.Object
   ↳ java.security.spec.RSAPrivateKeySpec


This class specifies an RSA private key.

Summary

Public constructors

RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent)

Creates a new RSAPrivateKeySpec.

RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent, AlgorithmParameterSpec params)

Creates a new RSAPrivateKeySpec with additional key parameters.

Public methods

BigInteger getModulus()

Returns the modulus.

AlgorithmParameterSpec getParams()

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

BigInteger getPrivateExponent()

Returns the private exponent.

Inherited methods

Public constructors

RSAPrivateKeySpec

Added in API level 1
public RSAPrivateKeySpec (BigInteger modulus, 
                BigInteger privateExponent)

Creates a new RSAPrivateKeySpec.

Parameters
modulus BigInteger: the modulus

privateExponent BigInteger: the private exponent

RSAPrivateKeySpec

Added in API level 1
public RSAPrivateKeySpec (BigInteger modulus, 
                BigInteger privateExponent, 
                AlgorithmParameterSpec params)

Creates a new RSAPrivateKeySpec with additional key parameters.

Parameters
modulus BigInteger: the modulus

privateExponent BigInteger: the private exponent

params AlgorithmParameterSpec: the parameters associated with this key, may be null

Public methods

getModulus

Added in API level 1
public BigInteger getModulus ()

Returns the modulus.

Returns
BigInteger the modulus

getParams

public AlgorithmParameterSpec getParams ()

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

Returns
AlgorithmParameterSpec the parameters associated with this key

getPrivateExponent

Added in API level 1
public BigInteger getPrivateExponent ()

Returns the private exponent.

Returns
BigInteger the private exponent