public class RSAKeyParameters extends AsymmetricKeyParameter implements javax.security.auth.Destroyable
| Constructor and Description |
|---|
RSAKeyParameters(boolean isPrivate,
java.math.BigInteger modulus,
java.math.BigInteger exponent) |
RSAKeyParameters(boolean isPrivate,
java.math.BigInteger modulus,
java.math.BigInteger exponent,
boolean isInternal) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy this object, dropping its reference to the exponent.
|
java.math.BigInteger |
getExponent() |
java.math.BigInteger |
getModulus() |
boolean |
isDestroyed() |
static java.math.BigInteger |
validateModulus(java.math.BigInteger modulus) |
isPrivatepublic RSAKeyParameters(boolean isPrivate,
java.math.BigInteger modulus,
java.math.BigInteger exponent)
public RSAKeyParameters(boolean isPrivate,
java.math.BigInteger modulus,
java.math.BigInteger exponent,
boolean isInternal)
public static java.math.BigInteger validateModulus(java.math.BigInteger modulus)
public java.math.BigInteger getModulus()
public java.math.BigInteger getExponent()
public void destroy()
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.
destroy in interface javax.security.auth.Destroyablepublic boolean isDestroyed()
isDestroyed in interface javax.security.auth.Destroyable