org.bouncycastle.crypto.params
Class RSAKeyParameters
java.lang.Object
org.bouncycastle.crypto.params.AsymmetricKeyParameter
org.bouncycastle.crypto.params.RSAKeyParameters
- All Implemented Interfaces:
- CipherParameters, javax.security.auth.Destroyable
- Direct Known Subclasses:
- RSAPrivateCrtKeyParameters
- public class RSAKeyParameters
- extends AsymmetricKeyParameter
- implements javax.security.auth.Destroyable
|
Constructor Summary |
RSAKeyParameters(boolean isPrivate,
java.math.BigInteger modulus,
java.math.BigInteger exponent)
|
RSAKeyParameters(boolean isPrivate,
java.math.BigInteger modulus,
java.math.BigInteger exponent,
boolean isInternal)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RSAKeyParameters
public RSAKeyParameters(boolean isPrivate,
java.math.BigInteger modulus,
java.math.BigInteger exponent)
RSAKeyParameters
public RSAKeyParameters(boolean isPrivate,
java.math.BigInteger modulus,
java.math.BigInteger exponent,
boolean isInternal)
validateModulus
public static java.math.BigInteger validateModulus(java.math.BigInteger modulus)
getModulus
public java.math.BigInteger getModulus()
getExponent
public java.math.BigInteger getExponent()
destroy
public void destroy()
- Destroy this object, dropping its reference to the exponent. The (public) modulus is
retained.
As BigInteger is immutable the exponent cannot be zeroized in place; destruction
drops the internal reference so the value becomes unreachable (cleared on garbage
collection). After destruction getExponent() throws
IllegalStateException.
This type also backs RSA public keys; destroying one of those drops the (non-secret)
public exponent, which is harmless but renders the key unusable.
- Specified by:
destroy in interface javax.security.auth.Destroyable
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed in interface javax.security.auth.Destroyable