Added in API level 1

RSAPublicKeySpec

public class RSAPublicKeySpec
extends Object implements KeySpec

java.lang.Object
   ↳ java.security.spec.RSAPublicKeySpec


This class specifies an RSA public key.

Summary

Public constructors

RSAPublicKeySpec(BigInteger modulus, BigInteger publicExponent)

Creates a new RSAPublicKeySpec.

RSAPublicKeySpec(BigInteger modulus, BigInteger publicExponent, AlgorithmParameterSpec params)

Creates a new RSAPublicKeySpec 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 getPublicExponent()

Returns the public 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

RSAPublicKeySpec

Added in API level 1
public RSAPublicKeySpec (BigInteger modulus, 
                BigInteger publicExponent)

Creates a new RSAPublicKeySpec.

Parameters
modulus BigInteger: the modulus

publicExponent BigInteger: the public exponent

RSAPublicKeySpec

Added in API level 35
public RSAPublicKeySpec (BigInteger modulus, 
                BigInteger publicExponent, 
                AlgorithmParameterSpec params)

Creates a new RSAPublicKeySpec with additional key parameters.

Parameters
modulus BigInteger: the modulus

publicExponent BigInteger: the public 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

getPublicExponent

Added in API level 1
public BigInteger getPublicExponent ()

Returns the public exponent.

Returns
BigInteger the public exponent