gnu.crypto.sig.rsa
Class GnuRSAKey
java.lang.Object
|
+--gnu.crypto.sig.rsa.GnuRSAKey
- All Implemented Interfaces:
- java.security.Key, java.security.interfaces.RSAKey, java.io.Serializable
- Direct Known Subclasses:
- GnuRSAPrivateKey, GnuRSAPublicKey
- 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.
- Version:
- $Revision: 1.2 $
- See Also:
- Serialized Form
Fields inherited from interface java.security.Key |
serialVersionUID |
Constructor Summary |
protected |
GnuRSAKey(java.math.BigInteger n)
Trivial protected constructor. |
Method Summary |
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.lang.String |
getFormat()
|
java.math.BigInteger |
getModulus()
|
java.math.BigInteger |
getN()
Returns the modulus n . |
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.security.Key |
getEncoded |
GnuRSAKey
protected GnuRSAKey(java.math.BigInteger n)
- Trivial protected constructor.
- Parameters:
n
- the public modulus p
.
getModulus
public java.math.BigInteger getModulus()
- Specified by:
getModulus
in interface java.security.interfaces.RSAKey
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithm
in interface java.security.Key
getFormat
public java.lang.String getFormat()
- Specified by:
getFormat
in interface java.security.Key
getN
public java.math.BigInteger getN()
- Returns the modulus
n
.
- Returns:
- the modulus
n
.
equals
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.
- Overrides:
equals
in class java.lang.Object
- Parameters:
obj
- the other non-null RSA key to compare to.- Returns:
true
if the designated object is of the same type and
value as this one.
Copyright ©2001-2002
Free Software Foundation, Inc.. All Rights Reserved.