Top Description Fields Constructors Methods
java.security.spec

public Class RSAPrivateKeySpec

extends Object
implements KeySpec
Class Inheritance
All Implemented Interfaces
java.security.spec.KeySpec
Known Direct Subclasses
java.security.spec.RSAMultiPrimePrivateCrtKeySpec, java.security.spec.RSAPrivateCrtKeySpec
Imports
java.math.BigInteger

This class specifies an RSA private key.
Author
Jan Luehe
Since
1.2
See Also
java.security.Key, java.security.KeyFactory, KeySpec, PKCS8EncodedKeySpec, RSAPublicKeySpec, RSAPrivateCrtKeySpec

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
RSAPrivateKeySpec(BigInteger
the modulus
modulus
,
BigInteger
the private exponent
privateExponent
)

Creates a new RSAPrivateKeySpec.

public
RSAPrivateKeySpec(BigInteger
the modulus
modulus
,
BigInteger
the private exponent
privateExponent
,
AlgorithmParameterSpec
the parameters associated with this key, may be null
params
)

Creates a new RSAPrivateKeySpec 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 private exponent
getPrivateExponent
()

Returns the private exponent.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

modulusback to summary
private final BigInteger modulus
paramsback to summary
private final AlgorithmParameterSpec params
privateExponentback to summary
private final BigInteger privateExponent

Constructor Detail

RSAPrivateKeySpecback to summary
public RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent)

Creates a new RSAPrivateKeySpec.

Parameters
modulus:BigInteger

the modulus

privateExponent:BigInteger

the private exponent

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

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
getPrivateExponentback to summary
public BigInteger getPrivateExponent()

Returns the private exponent.

Returns:BigInteger

the private exponent