Added in API level 1

RSAPrivateKeySpec

public class RSAPrivateKeySpec
extends Object implements KeySpec

java.lang.Object
   ↳ java.security.spec.RSAPrivateKeySpec
RSAMultiPrimePrivateCrtKeySpec This class specifies an RSA multi-prime private key, as defined in the PKCS#1 v2.2 standard using the Chinese Remainder Theorem (CRT) information values for efficiency. 
RSAPrivateCrtKeySpec This class specifies an RSA private key, as defined in the PKCS#1 v2.2 standard, using the Chinese Remainder Theorem (CRT) information values for efficiency. 


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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

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 35
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

Added in API level 35
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