public abstract class GnuRSAKey
extends java.lang.Object
implements java.security.Key, java.security.interfaces.RSAKey
A base asbtract class for both public and private RSA keys.
| Modifier | Constructor and Description |
|---|---|
protected |
GnuRSAKey(java.math.BigInteger n,
java.math.BigInteger e)
Trivial protected constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns
true if the designated object is an instance of
RSAKey and has the same RSA parameter values as this one. |
java.lang.String |
getAlgorithm() |
java.math.BigInteger |
getE()
Same as
getPublicExponent(). |
byte[] |
getEncoded()
Deprecated.
see getEncoded(int).
|
abstract byte[] |
getEncoded(int format) |
java.lang.String |
getFormat() |
java.math.BigInteger |
getModulus() |
java.math.BigInteger |
getN()
Returns the modulus
n. |
java.math.BigInteger |
getPublicExponent()
Returns the public exponent
e. |
protected GnuRSAKey(java.math.BigInteger n,
java.math.BigInteger e)
Trivial protected constructor.
n - the public modulus n.e - the public exponent e.public java.math.BigInteger getModulus()
getModulus in interface java.security.interfaces.RSAKeypublic java.lang.String getAlgorithm()
getAlgorithm in interface java.security.Keypublic byte[] getEncoded()
getEncoded in interface java.security.Keypublic java.lang.String getFormat()
getFormat in interface java.security.Keypublic java.math.BigInteger getN()
Returns the modulus n.
n.public java.math.BigInteger getPublicExponent()
Returns the public exponent e.
e.public java.math.BigInteger getE()
Same as getPublicExponent().
e.public boolean equals(java.lang.Object obj)
Returns true if the designated object is an instance of
RSAKey and has the same RSA parameter values as this one.
equals in class java.lang.Objectobj - the other non-null RSA key to compare to.true if the designated object is of the same type and
value as this one.public abstract byte[] getEncoded(int format)
Copyright © 2025. All rights reserved.