Top Description Fields Constructors Methods
java.security.spec

public Class RSAPublicKeySpec

extends Object
implements KeySpec
Class Inheritance
All Implemented Interfaces
java.security.spec.KeySpec
Imports
java.math.BigInteger

This class specifies an RSA public key.
Author
Jan Luehe
Since
1.2
See Also
java.security.Key, java.security.KeyFactory, KeySpec, X509EncodedKeySpec, RSAPrivateKeySpec, RSAPrivateCrtKeySpec

Field Summary

Modifier and TypeField and Description
private final BigInteger
private final AlgorithmParameterSpec
private final BigInteger

Constructor Summary

AccessConstructor and Description
public
RSAPublicKeySpec(BigInteger
the modulus
modulus
,
BigInteger
the public exponent
publicExponent
)

Creates a new RSAPublicKeySpec.

public
RSAPublicKeySpec(BigInteger
the modulus
modulus
,
BigInteger
the public exponent
publicExponent
,
AlgorithmParameterSpec
the parameters associated with this key, may be null
params
)

Creates a new RSAPublicKeySpec with additional key parameters.

Method Summary

Modifier and TypeMethod and Description
public BigInteger

Returns:

the modulus
getModulus
()

Returns the modulus.

public AlgorithmParameterSpec

Returns:

the parameters associated with this key
getParams
()

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

public BigInteger

Returns:

the public exponent
getPublicExponent
()

Returns the public exponent.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

modulusback to summary
private final BigInteger modulus
paramsback to summary
private final AlgorithmParameterSpec params
publicExponentback to summary
private final BigInteger publicExponent

Constructor Detail

RSAPublicKeySpecback to summary
public RSAPublicKeySpec(BigInteger modulus, BigInteger publicExponent)

Creates a new RSAPublicKeySpec.

Parameters
modulus:BigInteger

the modulus

publicExponent:BigInteger

the public exponent

RSAPublicKeySpecback to summary
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

Since
11

Method Detail

getModulusback to summary
public BigInteger getModulus()

Returns the modulus.

Returns:BigInteger

the modulus

getParamsback to summary
public AlgorithmParameterSpec getParams()

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

Returns:AlgorithmParameterSpec

the parameters associated with this key

Since
11
getPublicExponentback to summary
public BigInteger getPublicExponent()

Returns the public exponent.

Returns:BigInteger

the public exponent